mirror of
https://github.com/c0de-archive/hacktoberfest-2018.git
synced 2024-12-22 13:22:39 +00:00
5 lines
196 B
Haskell
5 lines
196 B
Haskell
{-# In Haskell, fibonacci function is considered a Hello world! application. #-}
|
|
fibAcc n = go n (0,1)
|
|
where
|
|
go !n (!a, !b) | n==0 = a
|
|
| otherwise = go (n-1) (b, a+b) |