373bef36b5a9fa3b4f356217e5bdac754eb3c4b5
[ghc-hetmet.git] / ghc / misc / examples / nfib / nfibD.hs
1 module Main where
2
3 main = print (nfib 28)
4
5 nfib :: Double -> Double
6
7 nfib n | n <= 1 = 1
8        | otherwise = (n1 + n2 + 1)
9                      where n1 = nfib (n-1) 
10                            n2 = nfib (n-2)