4 ms·
Nope. The result of (range 1 0) is an empty range, and when you apply * with no arguments you get 1.
by jcromartie 16y ago
Nope. The result of (range 1 0) is an empty range, and when you apply * with no arguments you get 1.
- hiena03 16y agook, thanks, it looks to similar to haskell: factorial n=foldl1 (*) [1..n] that will throw an exception for n<1 because you will have an empty list