packages feed

code-conjure-0.4.2: eg/list.out

length :: [Int] -> Int
-- testing 360 combinations of argument values
-- pruning with 4/8 rules
-- looking through 2 candidates of size 1
-- looking through 4 candidates of size 2
-- looking through 3 candidates of size 3
-- looking through 13 candidates of size 4
-- looking through 10 candidates of size 5
length []  =  0
length (x:xs)  =  length xs + 1

reverse :: [Int] -> [Int]
-- testing 360 combinations of argument values
-- pruning with 12/13 rules
-- looking through 2 candidates of size 1
-- looking through 3 candidates of size 2
-- looking through 11 candidates of size 3
-- looking through 24 candidates of size 4
-- looking through 60 candidates of size 5
-- looking through 152 candidates of size 6
reverse []  =  []
reverse (x:xs)  =  reverse xs ++ unit x

(++) :: [Int] -> [Int] -> [Int]
-- testing 360 combinations of argument values
-- pruning with 4/4 rules
-- looking through 3 candidates of size 1
-- looking through 11 candidates of size 2
-- looking through 38 candidates of size 3
-- looking through 136 candidates of size 4
-- looking through 517 candidates of size 5
-- looking through 1606 candidates of size 6
[] ++ xs  =  xs
(x:xs) ++ ys  =  x:(xs ++ ys)

length :: [Int] -> Int
-- testing 360 combinations of argument values
-- pruning with 6/10 rules
-- looking through 2 candidates of size 1
-- looking through 4 candidates of size 2
-- looking through 3 candidates of size 3
-- looking through 13 candidates of size 4
-- looking through 16 candidates of size 5
length []  =  0
length (x:xs)  =  length xs + 1

reverse :: [Int] -> [Int]
-- testing 360 combinations of argument values
-- pruning with 6/6 rules
-- looking through 2 candidates of size 1
-- looking through 1 candidates of size 2
-- looking through 3 candidates of size 3
-- looking through 2 candidates of size 4
-- looking through 5 candidates of size 5
-- looking through 15 candidates of size 6
reverse []  =  []
reverse (x:xs)  =  reverse xs ++ unit x

(++) :: [Int] -> [Int] -> [Int]
-- testing 360 combinations of argument values
-- pruning with 2/2 rules
-- looking through 3 candidates of size 1
-- looking through 8 candidates of size 2
-- looking through 11 candidates of size 3
-- looking through 48 candidates of size 4
xs ++ ys  =  foldr (:) ys xs

(\/) :: [Int] -> [Int] -> [Int]
-- testing 360 combinations of argument values
-- pruning with 4/4 rules
-- looking through 3 candidates of size 1
-- looking through 11 candidates of size 2
-- looking through 38 candidates of size 3
-- looking through 136 candidates of size 4
-- looking through 517 candidates of size 5
-- looking through 1606 candidates of size 6
[] \/ xs  =  xs
(x:xs) \/ ys  =  x:ys \/ xs