| Next | Atypical Types | 44 |
| fact :: | (Num a) => a -> a |
| n :: | (Num a) => a |
"fact must return (Num a) => a also."
fact 0 = 1
fact n = n * fact(n-1)
"The return value of 1 is consistent with that."
| Next | ![]() |
Copyright © 1999,2008 Mark Dominus |