Fixed runaway recursion in cond. However, let is still segfaulting, and member

does not work correctly.
This commit is contained in:
Simon Brooke 2026-02-25 11:17:40 +00:00
parent d34d891211
commit 8c63272214
12 changed files with 358 additions and 156 deletions

View file

@ -1,9 +1,14 @@
(set! nil? (lambda (o) (= o nil)))
(set! nil? (lambda
(o)
"`(nil? object)`: Return `t` if object is `nil`, else `t`."
(= o nil)))
(set! member (lambda
(item collection)
"Return `t` if this `item` is a member of this `collection`, else `nil`."
"`(member item collection)`: Return `t` if this `item` is a member of this `collection`, else `nil`."
(cond
((nil? collection) nil)
((= item (car collection)) t)
(t (member item (cdr collection))))))
(t (member item (cdr collection))))))
(member (type member) '("LMDA" "NLMD"))