projects
/
ghc-hetmet.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
a889a1e9486beee412823c1e3c3cd75b99933b6f
[ghc-hetmet.git]
/
ghc
/
misc
/
examples
/
nfib
/
nfibI.hs
1
module Main where
2
3
main = print (nfib 30)
4
5
nfib :: Int -> Int
6
7
nfib n | n <= 1 = 1
8
| otherwise = (n1 + n2 + 1)
9
where n1 = nfib (n-1)
10
n2 = nfib (n-2)