Skip to content

Instantly share code, notes, and snippets.

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