Created
April 28, 2016 23:05
-
-
Save amnn/1459f884ae70ed46f2e38d8344318c09 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Fact where | |
fact :: Integer -> Integer | |
fact 0 = 1 | |
fact n = n * fact (n-1) | |
factk :: Integer -> (Integer -> r) -> r | |
factk 0 k = k 1 | |
factk n k = factk (n-1) (k . (n*)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment