From 95dcacea5a1eabfee54c3edbe11b844bf1e5a2ec Mon Sep 17 00:00:00 2001 From: Daniel Cerqueira Date: Wed, 25 Feb 2026 15:13:52 +0000 Subject: replace ap function name to algo --- liblali.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'liblali.c') diff --git a/liblali.c b/liblali.c index 8be111f..cadd9e1 100644 --- a/liblali.c +++ b/liblali.c @@ -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) -- cgit