Skip to content

Instantly share code, notes, and snippets.

@suzuken
Created June 3, 2013 10:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save suzuken/5697444 to your computer and use it in GitHub Desktop.
Save suzuken/5697444 to your computer and use it in GitHub Desktop.
(use slib)
(require 'trace)
(define (factorial n)
(define (factorial n)
(if (= n 1)
1
(* n (factorial (- n 1)))))
(factorial n))
(trace factorial)
(print (factorial 5))
CALL factorial 5
RETN factorial 120
120
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment