Fixed runaway recursion in cond. However, let is still segfaulting, and member
does not work correctly.
This commit is contained in:
parent
d34d891211
commit
8c63272214
12 changed files with 358 additions and 156 deletions
|
|
@ -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"))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue