diff options
author | Keith Packard <keithp@keithp.com> | 2016-11-05 14:51:58 -0700 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2016-11-17 22:18:39 -0800 |
commit | 8f57c0761eaf1f10493fd52118d309eb69491464 (patch) | |
tree | de9b0b076296dd93a6eb0eab9e65da55df4018fe /src/lisp/ao_lisp_const.lisp | |
parent | 22076dcd5598ef30220bd9fde7a327765f447d43 (diff) |
altos/lisp: Change GC move API
Pass reference to move API so it can change the values in-place, then
let it return '1' when the underlying object has already been moved to
shorten GC times.
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'src/lisp/ao_lisp_const.lisp')
-rw-r--r-- | src/lisp/ao_lisp_const.lisp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/lisp/ao_lisp_const.lisp b/src/lisp/ao_lisp_const.lisp index 5ee15899..5ca89bd4 100644 --- a/src/lisp/ao_lisp_const.lisp +++ b/src/lisp/ao_lisp_const.lisp @@ -1,4 +1,7 @@ cadr (lambda (l) (car (cdr l))) +caddr (lambda (l) (car (cdr (cdr l)))) list (lexpr (l) l) 1+ (lambda (x) (+ x 1)) 1- (lambda (x) (- x 1)) +last (lambda (x) (cond ((cdr x) (last (cdr x))) ((car x)))) +prog* (lexpr (l) (last l)) |