diff options
author | Keith Packard <keithp@keithp.com> | 2016-11-05 14:51:58 -0700 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2017-02-20 11:16:50 -0800 |
commit | 3366efb139653939f053c1fe4aba352ba3b66c94 (patch) | |
tree | 57c01798cfaef078e4e8ca11680a9bb748ed3334 /src/lisp/ao_lisp_const.lisp | |
parent | 6fc1ee0f7adc6fcb3e850bcbaabc1db705314234 (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)) |