Skip to content

Instantly share code, notes, and snippets.

@slimane
Created January 4, 2014 04:10
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 slimane/8251550 to your computer and use it in GitHub Desktop.
Save slimane/8251550 to your computer and use it in GitHub Desktop.
import Debug.Trace
fact 0 = 1
fact n = n * fact (n - 1)
superFact 0 = 1
superFact n = superFact' (n', n')
where
n' = fact n
superFact' (_, 0) = 1
superFact' (n, o) = n^superFact' (n, o - 1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment