Skip to content

Instantly share code, notes, and snippets.

@jutememo
Created May 9, 2011 16:18
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 jutememo/962816 to your computer and use it in GitHub Desktop.
Save jutememo/962816 to your computer and use it in GitHub Desktop.
fact'cps n k | n == 0 = k 1
| otherwise = fact'cps (n-1) (\x -> k (n * x))
fact_cps n k | n == 0 = k 1
| otherwise = fact_cps (n-1) (\x -> k (n * x))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment