| Next | Atypical Types | 42 |
| fact :: | (Num a) => a -> b |
| n :: | (Num a) => a |
"0 has type (Num a) => a."
"So n must have that type too."
fact 0 = 1
fact n = n * fact(n-1)
"n-1 checks out okay."
| Next | ![]() |
Copyright © 1999,2008 Mark Dominus |