Created
February 18, 2012 22:54
-
-
Save bohde/1861248 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| (match n | |
| 0 1 | |
| _ (* n (factorial (- n 1)))) | |
| ;;expands to | |
| (try | |
| (cond (= n 0) 1 :else (throw backtrack)) | |
| (catch | |
| java.lang.Exception | |
| e__7660__auto__ | |
| (if (identical? e__7660__auto__ backtrack) | |
| (do (let [] (* n (factorial (- n 1))))) | |
| (throw e__7660__auto__)))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment