Well, I'm back to the same failed unit tests as the develop branch
and I *feel* that the intern code is better. But it's not without problems and I don't think I can release at this. But it may be ready to merge back.
This commit is contained in:
parent
bcb227a5f9
commit
3a1f64d7ff
15 changed files with 284 additions and 184 deletions
|
|
@ -3,6 +3,31 @@
|
|||
;; `nth` (from `nth.lisp`)
|
||||
;; `string?` (from `types.lisp`)
|
||||
|
||||
(set! nil? (lambda
|
||||
(o)
|
||||
"`(nil? object)`: Return `t` if object is `nil`, else `t`."
|
||||
(= o nil)))
|
||||
|
||||
(set! member? (lambda
|
||||
(item collection)
|
||||
"`(member item collection)`: Return `t` if this `item` is a member of this `collection`, else `nil`."
|
||||
;; (print (list "In member? item is " item "; collection is " collection))
|
||||
;; (println)
|
||||
(cond
|
||||
((= nil collection) nil)
|
||||
((= item (car collection)) t)
|
||||
(t (member? item (cdr collection))))))
|
||||
|
||||
;; (member? (type member?) '("LMDA" "NLMD"))
|
||||
|
||||
(set! nth (lambda (n l)
|
||||
"Return the `n`th member of this list `l`, or `nil` if none."
|
||||
(cond ((= nil l) nil)
|
||||
((= n 1) (car l))
|
||||
(t (nth (- n 1) (cdr l))))))
|
||||
|
||||
(set! string? (lambda (o) "True if `o` is a string." (= (type o) "STRG") ) )
|
||||
|
||||
(set! documentation (lambda (object)
|
||||
"`(documentation object)`: Return documentation for the specified `object`, if available, else `nil`."
|
||||
(cond ((member? (type object) '("FUNC" "SPFM"))
|
||||
|
|
@ -15,3 +40,7 @@
|
|||
|
||||
(set! doc documentation)
|
||||
|
||||
(documentation apply)
|
||||
|
||||
;; (documentation member?)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue