diff options
Diffstat (limited to 'src/boot/strap/utility.clisp')
-rw-r--r-- | src/boot/strap/utility.clisp | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/src/boot/strap/utility.clisp b/src/boot/strap/utility.clisp index 9b394a17..9b7dbef4 100644 --- a/src/boot/strap/utility.clisp +++ b/src/boot/strap/utility.clisp @@ -6,7 +6,8 @@ (PROVIDE "utility") (EXPORT '(|objectMember?| |symbolMember?| |stringMember?| |charMember?| - |scalarMember?| |listMember?| |reverse| |reverse!|)) + |scalarMember?| |listMember?| |reverse| |reverse!| + |lastNode|)) (DEFUN |objectMember?| (|x| |l|) (LOOP @@ -86,3 +87,15 @@ (SETQ |l1| |l|) (SETQ |l| |l2|)) (T (RETURN |l1|)))))))) +(DEFUN |lastNode| (|l|) + (PROG (|l'|) + (RETURN + (PROGN + (LOOP + (COND + ((NOT (AND (CONSP |l|) (PROGN (SETQ |l'| (CDR |l|)) T) + (CONSP |l'|))) + (RETURN NIL)) + (T (SETQ |l| |l'|)))) + |l|)))) + |