Lexical jumps

This commit is contained in:
2026-09-05 00:58:11 -07:00
parent 8024bcfee3
commit 956297335d
13 changed files with 164 additions and 49 deletions
+5 -16
View File
@@ -141,22 +141,11 @@ DEFUN(nth, "nth", (LispVal * n, LispVal *list), "(n list)", "") {
return nth(XFIXNUM(n), list);
}
DEFUN(member, "member", (LispVal * elt, LispVal *list, LispVal *pred),
"(elt list &optional pred)", "") {
if (NILP(pred) || pred == Qeq) {
// fast case
DOTAILS(rest, list) {
CHECK_LISTP(rest);
if (elt == XCAR(rest)) {
return rest;
}
}
} else {
DOTAILS(rest, list) {
CHECK_LISTP(rest);
if (!NILP(CALL(pred, elt, XCAR(rest)))) {
return rest;
}
DEFUN(memq, "memq", (LispVal * elt, LispVal *list), "(elt list)", "") {
DOTAILS(rest, list) {
CHECK_LISTP(rest);
if (elt == XCAR(rest)) {
return rest;
}
}
return Qnil;