diff options
| author | Daniel Cerqueira <dan.git@lispclub.com> | 2026-01-25 18:45:43 +0000 |
|---|---|---|
| committer | Daniel Cerqueira <dan.git@lispclub.com> | 2026-01-25 18:45:43 +0000 |
| commit | 156d4befa762b6bbdd93b2457c92ab2dfa66f73c (patch) | |
| tree | e60132d828a6b7220a825bf6d8a1a02d439442a8 | |
| parent | b3208c29db97942ba6b0c46148f592a0c0b6b34e (diff) | |
add reverse defun
| -rw-r--r-- | liblali.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -1676,6 +1676,11 @@ static char *stdlib = LISP( (defun append (xs y) (fill ((ap xs) y) (f (cons (car xs) (append (cdr xs) y))))) + + (defun reverse (xs) + (fill + ((space (cdr xs)) (append (reverse (cdr xs)) (list (car xs)))) + (f xs))) ); // MAIN /////////////////////////////////////////////////////////////////////// |
