Created
December 23, 2013 07:46
-
-
Save l1x/8093128 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
sicp-clojure.core=> (dotrace [iter] (fact-lin-it2 6)) | |
TRACE t1666: (iter 1 1) | |
TRACE t1667: | (iter 1 2) | |
TRACE t1668: | | (iter 2 3) | |
TRACE t1669: | | | (iter 6 4) | |
TRACE t1670: | | | | (iter 24 5) | |
TRACE t1671: | | | | | (iter 120 6) | |
TRACE t1672: | | | | | | (iter 720 7) | |
TRACE t1672: | | | | | | => 720 | |
TRACE t1671: | | | | | => 720 | |
TRACE t1670: | | | | => 720 | |
TRACE t1669: | | | => 720 | |
TRACE t1668: | | => 720 | |
TRACE t1667: | => 720 | |
TRACE t1666: => 720 | |
720 | |
sicp-clojure.core=> | |
sicp-clojure.core=> (dotrace [factorial-lin-recur] (factorial-lin-recur 6)) | |
TRACE t1678: (factorial-lin-recur 6) | |
TRACE t1679: | (factorial-lin-recur 5) | |
TRACE t1680: | | (factorial-lin-recur 4) | |
TRACE t1681: | | | (factorial-lin-recur 3) | |
TRACE t1682: | | | | (factorial-lin-recur 2) | |
TRACE t1683: | | | | | (factorial-lin-recur 1) | |
TRACE t1683: | | | | | => 1 | |
TRACE t1682: | | | | => 2 | |
TRACE t1681: | | | => 6 | |
TRACE t1680: | | => 24 | |
TRACE t1679: | => 120 | |
TRACE t1678: => 720 | |
720 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The following would be better: