Skip to content

Instantly share code, notes, and snippets.

@weskerfoot
Created December 9, 2013 19:26
Show Gist options
  • Save weskerfoot/7879252 to your computer and use it in GitHub Desktop.
Save weskerfoot/7879252 to your computer and use it in GitHub Desktop.
fib = (\ n -> (if ((((==) n)) 0) then 0 else (if ((((==) n)) 1) then 1 else ((((+) ((fib) ((n) -1)))) ((fib) ((n) -2))))))
fact = (\ n -> (if ((((==) n)) 0) then 1 else ((((*) ((fact) ((n) -1)))) n)))
ns = (((((:)) 1)) (((((:)) 2)) (((((:)) 3)) (((((:)) 4)) (((((:)) 5)) [])))))
main = ((((>>) ((print) ((fib) 19)))) ((print) ((((>>=) ns)) ((((.) return)) fact))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment