Skip to content

Instantly share code, notes, and snippets.

@weskerfoot
Created December 9, 2013 19:38
Show Gist options
  • Save weskerfoot/7879427 to your computer and use it in GitHub Desktop.
Save weskerfoot/7879427 to your computer and use it in GitHub Desktop.
def (fib n)
if (n == 0)
then 0
else if (n == 1)
then 1
else
((fib (n-1)) +
(fib (n-2)))
def (fact n)
if (n == 0)
then 1
else
((fact (n-1)) * n)
def ns [1,2,3,4,5]
def 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