Skip to content

Instantly share code, notes, and snippets.

@codeck
Created May 21, 2012 10:23
Show Gist options
  • Save codeck/2761692 to your computer and use it in GitHub Desktop.
Save codeck/2761692 to your computer and use it in GitHub Desktop.
factorial() lambda recursive version
(funcall
(lambda (fn n)
(funcall fn n fn))
(lambda (n this)
(cond ((> n 0)
(* n (funcall this (- n 1) this)))
(t 1)))
10)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment