exercises and notes from "Gentle introduction"
This commit is contained in:
13
trace-and-dtrace.lisp
Normal file
13
trace-and-dtrace.lisp
Normal file
@@ -0,0 +1,13 @@
|
||||
|
||||
(defun half (n) (* n 0.5))
|
||||
|
||||
(defun average (x y)
|
||||
(half (+ x y)))
|
||||
|
||||
(trace) ; returns list of traced functions
|
||||
(trace half average)
|
||||
|
||||
(average 7 5) ; tree of calls printed into repl
|
||||
|
||||
(untrace half)
|
||||
(untrace) ; untraces all
|
||||
Reference in New Issue
Block a user