Create a gist now

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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