Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
5
Task/Introspection/Common-Lisp/introspection-1.lisp
Normal file
5
Task/Introspection/Common-Lisp/introspection-1.lisp
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
(let* ((ver (lisp-implementation-version))
|
||||
(major (parse-integer ver :start 0 :end (position #\. ver))))
|
||||
#+lispworks (assert (>= 5 major) () "Requires Lispworks version 5 or above")
|
||||
#+clisp (assert (>= 2 major) () "Requires CLISP 2.n")
|
||||
)
|
||||
4
Task/Introspection/Common-Lisp/introspection-2.lisp
Normal file
4
Task/Introspection/Common-Lisp/introspection-2.lisp
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
(defvar bloop -4)
|
||||
(if (and (fboundp 'abs)
|
||||
(boundp 'bloop))
|
||||
(format t "~d~%" (abs bloop)))
|
||||
10
Task/Introspection/Common-Lisp/introspection-3.lisp
Normal file
10
Task/Introspection/Common-Lisp/introspection-3.lisp
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
(let ((sum 0)
|
||||
(ints '()))
|
||||
(loop for pkg in (list-all-packages)
|
||||
do (do-symbols (s pkg)
|
||||
(when (and (boundp s)
|
||||
(integerp (symbol-value s)))
|
||||
(push s ints)
|
||||
(incf sum (symbol-value s)))))
|
||||
(format t "there are ~d integer variables adding up to ~d~%"
|
||||
(length ints) sum))
|
||||
Loading…
Add table
Add a link
Reference in a new issue