Created
July 7, 2014 06:45
-
-
Save m1el/7b6fff90ab249d8dc5ce 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
λ let nest f n x = if n <= 0 then x else f (nest f (n-1) x) | |
λ let pow2 x = x^x | |
λ nest pow2 3 3 | |
<interactive>: out of memory (requested 1048576 bytes) | |
λ import Data.List | |
λ let nest f n x = foldl' (\a _->f a) x [1..n] | |
λ let pow2 x = x^x | |
λ nest pow2 3 3 | |
<interactive>: out of memory (requested 1048576 bytes) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment