projects
/
ghc-hetmet.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
[project @ 1996-01-08 20:28:12 by partain]
[ghc-hetmet.git]
/
ghc
/
misc
/
examples
/
nfib
/
nfibR.hs
1
module Main where
2
3
main = print (nfib 20)
4
5
nfib :: Rational -> Rational
6
7
nfib n | n <= 1 = 1
8
| otherwise = (n1 + n2 + 1)
9
where n1 = nfib (n-1)
10
n2 = nfib (n-2)