count :: A -> [A] -> Int
-- testing 13 combinations of argument values
-- pruning with 1/2 rules
-- 0 candidates of size 1
-- 1 candidates of size 2
-- 0 candidates of size 3
-- 0 candidates of size 4
-- 1 candidates of size 5
-- tested 2 candidates
count x xs = length (filter (x ==) xs)
count :: A -> [A] -> Int
-- testing 13 combinations of argument values
-- pruning with 8/13 rules
-- 2 candidates of size 1
-- 0 candidates of size 2
-- 0 candidates of size 3
-- 0 candidates of size 4
-- 0 candidates of size 5
-- 4 candidates of size 6
-- 0 candidates of size 7
-- 12 candidates of size 8
-- 16 candidates of size 9
-- 20 candidates of size 10
-- 44 candidates of size 11
-- tested 57 candidates
count x [] = 0
count x (y:xs) = (if x == y then 1 else 0) + count x xs
count :: A -> [A] -> Int
-- testing 13 combinations of argument values
-- pruning with 8/13 rules
-- 2 candidates of size 1
-- 0 candidates of size 2
-- 0 candidates of size 3
-- 0 candidates of size 4
-- 0 candidates of size 5
-- 4 candidates of size 6
-- 0 candidates of size 7
-- 12 candidates of size 8
-- 16 candidates of size 9
-- 20 candidates of size 10
-- 20 candidates of size 11
-- 44 candidates of size 12
-- 64 candidates of size 13
-- tested 155 candidates
count x [] = 0
count x (y:xs)
| x == y = 1 + count x xs
| otherwise = count x xs