aboutsummaryrefslogtreecommitdiff
path: root/src/boot/strap
diff options
context:
space:
mode:
authordos-reis <gdr@axiomatics.org>2011-04-21 14:59:12 +0000
committerdos-reis <gdr@axiomatics.org>2011-04-21 14:59:12 +0000
commitf5a47d23d57cb91b89254c7a5904baee0f004e2b (patch)
treef087fdd7f56828ef8429f6c9400c6d3c41786aa0 /src/boot/strap
parent8672c9ca7ea2f66a0ab372697c258dac5bb43382 (diff)
downloadopen-axiom-f5a47d23d57cb91b89254c7a5904baee0f004e2b.tar.gz
* boot/tokens.boot: Don't translate lastNode anymore.
* boot/utility.boot (lastNode): Define.
Diffstat (limited to 'src/boot/strap')
-rw-r--r--src/boot/strap/tokens.clisp5
-rw-r--r--src/boot/strap/utility.clisp15
2 files changed, 16 insertions, 4 deletions
diff --git a/src/boot/strap/tokens.clisp b/src/boot/strap/tokens.clisp
index 9f1694f6..0de0c434 100644
--- a/src/boot/strap/tokens.clisp
+++ b/src/boot/strap/tokens.clisp
@@ -219,9 +219,8 @@
(LIST '|fourth| 'CADDDR) (LIST '|function| 'FUNCTION)
(LIST '|function?| 'FUNCTIONP)
(LIST '|gensym| 'GENSYM) (LIST '|genvar| 'GENVAR)
- (LIST '|integer?| 'INTEGERP) (LIST '|lastNode| 'LAST)
- (LIST 'LAST '|last|) (LIST '|list| 'LIST)
- (LIST '|listEq?| 'EQUAL)
+ (LIST '|integer?| 'INTEGERP) (LIST 'LAST '|last|)
+ (LIST '|list| 'LIST) (LIST '|listEq?| 'EQUAL)
(LIST '|lowerCase?| 'LOWER-CASE-P)
(LIST '|makeSymbol| 'INTERN)
(LIST '|maxIndex| 'MAXINDEX) (LIST '|mkpf| 'MKPF)
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|))))
+