Created
February 10, 2012 10:02
-
-
Save adh/1788298 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/\___/\ dfsch version 0.4.0-dev | |
( o o ) (rel-0.3.0-1300-gef083bd) [Feb 10 2012 08:46:38] | |
== * == dfsch is free software, and you are welcome to redistribute it | |
) ( under certain conditions; see file COPYING for details. | |
]=> (define (fact x) | |
..> (if (< x 2) | |
..> 1 | |
..> (* x (fact (1- x))))) | |
#<standard-function 0x1d23aa0 fact(x)> | |
]=> (trace-function! fact) | |
#<standard-function 0x1d23aa0 fact(x)> | |
]=> (fact 6) | |
;; +<< #<standard-function 0x1d23aa0 fact(x)> | |
;; | \ (6) | |
;; | +<< #<standard-function 0x1d23aa0 fact(x)> | |
;; | | \ (5) | |
;; | | +<< #<standard-function 0x1d23aa0 fact(x)> | |
;; | | | \ (4) | |
;; | | | +<< #<standard-function 0x1d23aa0 fact(x)> | |
;; | | | | \ (3) | |
;; | | | | +<< #<standard-function 0x1d23aa0 fact(x)> | |
;; | | | | | \ (2) | |
;; | | | | | +<< #<standard-function 0x1d23aa0 fact(x)> | |
;; | | | | | | \ (1) | |
;; | | | | | +>> #<standard-function 0x1d23aa0 fact(x)> | |
;; | | | | | \ (1) -> 1 | |
;; | | | | +>> #<standard-function 0x1d23aa0 fact(x)> | |
;; | | | | \ (2) -> 2 | |
;; | | | +>> #<standard-function 0x1d23aa0 fact(x)> | |
;; | | | \ (3) -> 6 | |
;; | | +>> #<standard-function 0x1d23aa0 fact(x)> | |
;; | | \ (4) -> 24 | |
;; | +>> #<standard-function 0x1d23aa0 fact(x)> | |
;; | \ (5) -> 120 | |
;; +>> #<standard-function 0x1d23aa0 fact(x)> | |
;; \ (6) -> 720 | |
720 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment