3 ms·
In haskell you can write exactly the following: fact 0 = 0 fact 1 = 1 fact n = n * fact (n-1) It works as you would expect and really they aren't
by TheDong 12y ago
In haskell you can write exactly the following:
fact 0 = 0
fact 1 = 1
fact n = n * fact (n-1)
It works as you would expect and really they aren't that dissimilar.
- FreeFull 12y agoSmall correction, fact 0 = 1