| ... | ... | @@ -22,6 +22,13 @@ fib n = fib (n-1) + fib (n-2) |
|
|
|
But what is the value of **fib (-3)**? A runtime stack overflow! Much better to catch this error at compile time.
|
|
|
|
|
|
|
|
|
|
|
|
## Comment
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
If we do add them, then (a) they should probably be arbitrary in size; and (b) function definitions like fib should \*not\* be overloaded on Num, but should be monomorphic in Nat.
|
|
|
|
|
|
|
|
|
|
|
|
## Proposal
|
|
|
|
|
|
|
|
|
| ... | ... | |