Skip to content

Instantly share code, notes, and snippets.

@riffraff
Created November 16, 2013 14:21
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 riffraff/7500698 to your computer and use it in GitHub Desktop.
Save riffraff/7500698 to your computer and use it in GitHub Desktop.
freezes online elm repl
iterate n f x =
if n == 0 then x
else iterate(n - 1 f f(x))
square x = x * x
main = asText (iterate 4 square 0)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment