packages feed

code-conjure-0.5.8: 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 2 candidates of size 2
-- looking through 1 candidates of size 3
-- looking through 2 candidates of size 4
-- looking through 2 candidates of size 5
-- tested 9 candidates
length []  =  0
length (x:xs)  =  length xs + 1

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

(++) :: [Int] -> [Int] -> [Int]
-- testing 360 combinations of argument values
-- pruning with 0/0 rules
-- looking through 3 candidates of size 1
-- looking through 7 candidates of size 2
-- looking through 11 candidates of size 3
-- looking through 37 candidates of size 4
-- looking through 98 candidates of size 5
-- looking through 94 candidates of size 6
-- tested 194 candidates
[] ++ xs  =  xs
(x:xs) ++ ys  =  x:(xs ++ ys)

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

zip :: [Int] -> [Int] -> [(Int,Int)]
-- testing 360 combinations of argument values
-- pruning with 0/0 rules
-- looking through 1 candidates of size 1
-- looking through 0 candidates of size 2
-- looking through 0 candidates of size 3
-- looking through 8 candidates of size 4
-- looking through 6 candidates of size 5
-- looking through 2 candidates of size 6
-- looking through 14 candidates of size 7
-- looking through 9 candidates of size 8
-- looking through 31 candidates of size 9
-- tested 50 candidates
zip [] xs  =  []
zip (x:xs) []  =  []
zip (x:xs) (y:ys)  =  (x,y):zip xs ys

(\/) :: [Int] -> [Int] -> [Int]
-- testing 360 combinations of argument values
-- pruning with 0/0 rules
-- looking through 3 candidates of size 1
-- looking through 7 candidates of size 2
-- looking through 11 candidates of size 3
-- looking through 37 candidates of size 4
-- looking through 98 candidates of size 5
-- looking through 94 candidates of size 6
-- tested 196 candidates
[] \/ xs  =  xs
(x:xs) \/ ys  =  x:ys \/ xs

ordered :: [Int] -> Bool
-- testing 360 combinations of argument values
-- pruning with 29/39 rules
-- looking through 2 candidates of size 1
-- looking through 2 candidates of size 2
-- looking through 3 candidates of size 3
-- looking through 3 candidates of size 4
-- looking through 4 candidates of size 5
-- looking through 12 candidates of size 6
-- looking through 20 candidates of size 7
-- looking through 30 candidates of size 8
-- looking through 56 candidates of size 9
-- looking through 114 candidates of size 10
-- looking through 216 candidates of size 11
-- tested 333 candidates
ordered []  =  True
ordered (x:xs)  =  ordered xs && (null xs || x <= head xs)

merge :: [Int] -> [Int] -> [Int]
-- testing 360 combinations of argument values
-- pruning with 1/2 rules
-- looking through 2 candidates of size 1
-- looking through 1 candidates of size 2
-- looking through 3 candidates of size 3
-- looking through 12 candidates of size 4
-- looking through 22 candidates of size 5
-- looking through 32 candidates of size 6
-- looking through 75 candidates of size 7
-- looking through 108 candidates of size 8
-- looking through 256 candidates of size 9
-- looking through 520 candidates of size 10
-- looking through 1329 candidates of size 11
-- looking through 2632 candidates of size 12
-- tested 4992 candidates
cannot conjure