fibonacci

Run Settings
LanguageHaskell
Language Version
Run Command
--https://wiki.haskell.org/How_to_work_on_lists --https://glot.io/snippets/ev9dcz4214 fib :: [Int] -> Int -> [Int] fib [0] l = fib [0,1] l fib x l | length x < l = fib (x ++ [last x + last (init x)]) l | length x == l = x fibonacci = fib [0] main = do print(fib [0] 10) print(fibonacci 10)
Editor Settings
Theme
Key bindings
Full width
Lines