common-lisp-study/toolkit.lisp

23 lines
476 B
Common Lisp

;;; 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