exercises and notes from "Gentle introduction"
This commit is contained in:
22
toolkit.lisp
Normal file
22
toolkit.lisp
Normal file
@@ -0,0 +1,22 @@
|
||||
|
||||
|
||||
;;; TIME
|
||||
;; it's profiling of evaluation
|
||||
(defun addup (n)
|
||||
(do ((i 0 (+ 1 i))
|
||||
(sum 0 (+ sum i)))
|
||||
((> i n) sum)))
|
||||
|
||||
(time (addup 10)) ; prints into repl
|
||||
(time (addup 1000000))
|
||||
(time (addup 10000000))
|
||||
|
||||
|
||||
;;; DESCRIBE and INSPECT
|
||||
(describe #'cons) ; prints into repl, same as K +lookup/documentation
|
||||
|
||||
;; INSPECT - is interactive
|
||||
;; H - for help
|
||||
;; U - for UP, Q/E - to exit
|
||||
;; numbers - to dig into slots of a structure
|
||||
|
||||
Reference in New Issue
Block a user