packages feed

code-conjure-0.5.4: eg/factorial.out

factorial :: Int -> Int
-- testing 4 combinations of argument values
-- pruning with 27/65 rules
-- looking through 3 candidates of size 1
-- looking through 4 candidates of size 2
-- looking through 11 candidates of size 3
-- looking through 29 candidates of size 4
-- looking through 60 candidates of size 5
-- looking through 145 candidates of size 6
-- looking through 501 candidates of size 7
-- tested 283 candidates
factorial 0  =  1
factorial x  =  x * factorial (x - 1)

factorial :: Int -> Int
-- testing 4 combinations of argument values
-- pruning with 32/72 rules
-- looking through 3 candidates of size 1
-- looking through 4 candidates of size 2
-- looking through 11 candidates of size 3
-- looking through 29 candidates of size 4
-- looking through 60 candidates of size 5
-- looking through 209 candidates of size 6
-- tested 148 candidates
factorial x  =  foldr (*) 1 [1..x]