--https://wiki.haskell.org/How_to_work_on_lists
--http://coolaf.com/run/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)