hacktoberfest-2018/code/hello.hs

5 lines
196 B
Haskell
Raw Normal View History

2018-10-06 07:14:59 +00:00
{-# 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)