factorial :: Int -> Int -- testing 6 combinations of argument values -- pruning with 4/8 rules -- looking through 2 candidates of size 1 -- looking through 0 candidates of size 2 -- looking through 1 candidates of size 3 -- looking through 0 candidates of size 4 -- looking through 1 candidates of size 5 -- looking through 8 candidates of size 6 factorial n = foldr (*) 1 [1..n] factorial :: Int -> Int -- testing 6 combinations of argument values -- pruning with 40/73 rules -- looking through 3 candidates of size 1 -- looking through 2 candidates of size 2 -- looking through 5 candidates of size 3 -- looking through 6 candidates of size 4 -- looking through 20 candidates of size 5 -- looking through 27 candidates of size 6 -- looking through 87 candidates of size 7 -- looking through 173 candidates of size 8 -- looking through 434 candidates of size 9 -- looking through 1016 candidates of size 10 factorial n = if n == 0 then 1 else n * factorial (dec n)