Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- fib :: Int -> Integer
- fib 0 = 0
- fib 1 = 1
- fib n = fib (n-1) + fib (n-2)
- fib' :: Int -> Integer
- fib' n = fst $ sequence !! n -- backslash is similar so stay as lambda function, first element of pair
- where --to !! marks for index
- --relation to , image of function
Add Comment
Please, Sign In to add comment