Post Scarcity
A prototype for a post scarcity programming environment
Loading...
Searching...
No Matches
documentation.lisp
Go to the documentation of this file.
1;; This function depends on:
2;; `member` (from file `member.lisp`)
3;; `nth` (from `nth.lisp`)
4;; `string?` (from `types.lisp`)
5
6(set! documentation (lambda (object)
7 "`(documentation object)`: Return documentation for the specified `object`, if available, else `nil`."
8 (cond ((member? (type object) '("FUNC" "SPFM"))
9 (:documentation (meta object)))
10 ((member? (type object) '("LMDA" "NLMD"))
11 (let ((d . (nth 3 (source object))))
12 (cond ((string? d) d)
13 (t (source object)))))
14 (t object))))
15
16(set! doc documentation)
17