Skip to content

Instantly share code, notes, and snippets.

@itfrombit
Created September 12, 2010 19:35
Show Gist options
  • Save itfrombit/576361 to your computer and use it in GitHub Desktop.
Save itfrombit/576361 to your computer and use it in GitHub Desktop.
(macro dbg (s)
`(let ((_a ,s))
(print ',s)
(print " = ")
(puts _a)
_a))
(function factorial (n)
(if (< n 2)
(then n)
(else (dbg (* n (factorial (- n 1)))))))
('(1 2 3 4 5) each: (do (n)
(puts (factorial n))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment