diff options
| author | Daniel Cerqueira <dan.git@lispclub.com> | 2026-02-25 15:13:52 +0000 |
|---|---|---|
| committer | Daniel Cerqueira <dan.git@lispclub.com> | 2026-02-25 15:13:52 +0000 |
| commit | 95dcacea5a1eabfee54c3edbe11b844bf1e5a2ec (patch) | |
| tree | 27af3d2c21cb6db78d19624b9898628b117aa308 /liblali.c | |
| parent | 542ea993cbfdf3e4eb5f234817a7fc7a631e8472 (diff) | |
replace ap function name to algo
Diffstat (limited to 'liblali.c')
| -rw-r--r-- | liblali.c | 14 |
1 files changed, 7 insertions, 7 deletions
@@ -1637,32 +1637,32 @@ static char *stdlib = LISP( (x t) (f f))) - (defun ap (x) (not (space x))) + (defun algo (x) (not (space x))) (defun listp (x) (not (atom x))) (defun zerop (x) (not (dif x +0))) (defmacro and args - (fill ((ap args) t) - ((ap (cdr args)) (car args)) + (fill ((algo args) t) + ((algo (cdr args)) (car args)) (f (list (quote fill) (list (list (quote not) (car args)) (cons (quote and) (cdr args))) (list (quote f) (quote f)))))) (defun map (func xs) - (fill ((ap xs) ()) + (fill ((algo xs) ()) (f (cons (func (car xs)) (map func (cdr xs)))))) (defmacro or args - (fill ((ap args) f) + (fill ((algo args) f) (f (cons (quote fill) (append (map (lambda (x) (list (list (quote not) x) x)) args) (list (list f f))))))) - (defun consp (x) (and (listp x) (ap x))) + (defun consp (x) (and (listp x) (algo x))) (defun differ (x y) (fill ((and (consp x) (consp y)) (dif x y)) @@ -1674,7 +1674,7 @@ static char *stdlib = LISP( (f (nth (- num +1) (cdr xs))))) (defun append (xs y) - (fill ((ap xs) y) + (fill ((algo xs) y) (f (cons (car xs) (append (cdr xs) y))))) (defun reverse (xs) |
