packages feed

code-conjure-0.3.0: test/model/eg/list.out

length :: [Int] -> Int
-- testing 60 combinations of argument values
-- 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 5 candidates of size 5
-- looking through 11 candidates of size 6
-- looking through 20 candidates of size 7
-- looking through 45 candidates of size 8
-- looking through 79 candidates of size 9
length xs  =  if null xs then 0 else 1 + length (tail xs)

reverse :: [Int] -> [Int]
-- testing 60 combinations of argument values
-- looking through 2 candidates of size 1
-- looking through 4 candidates of size 2
-- looking through 9 candidates of size 3
-- looking through 24 candidates of size 4
-- looking through 65 candidates of size 5
-- looking through 215 candidates of size 6
-- looking through 673 candidates of size 7
-- looking through 2174 candidates of size 8
-- looking through 7100 candidates of size 9
-- looking through 23503 candidates of size 10
-- looking through 78714 candidates of size 11
reverse xs  =  if null xs then xs else reverse (tail xs) ++ unit (head xs)

sort :: [Int] -> [Int]
-- testing 60 combinations of argument values
-- looking through 2 candidates of size 1
-- looking through 4 candidates of size 2
-- looking through 6 candidates of size 3
-- looking through 12 candidates of size 4
-- looking through 31 candidates of size 5
-- looking through 98 candidates of size 6
-- looking through 287 candidates of size 7
-- looking through 790 candidates of size 8
-- looking through 2188 candidates of size 9
-- looking through 6290 candidates of size 10
sort xs  =  if null xs then xs else insert (head xs) (sort (tail xs))

(++) :: [Int] -> [Int] -> [Int]
-- testing 60 combinations of argument values
-- looking through 3 candidates of size 1
-- looking through 3 candidates of size 2
-- looking through 12 candidates of size 3
-- looking through 39 candidates of size 4
-- looking through 83 candidates of size 5
-- looking through 290 candidates of size 6
-- looking through 1013 candidates of size 7
-- looking through 3482 candidates of size 8
-- looking through 11171 candidates of size 9
-- looking through 36185 candidates of size 10
-- looking through 123417 candidates of size 11
xs ++ ys  =  if null xs then ys else head xs:(tail xs ++ ys)

length :: [Int] -> Int
-- testing 60 combinations of argument values
-- looking through 2 candidates of size 1
-- looking through 1 candidates of size 2
-- looking through 1 candidates of size 3
-- looking through 4 candidates of size 4
-- looking through 2 candidates of size 5
-- looking through 10 candidates of size 6
length xs  =  foldr (const (1 +)) 0 xs

reverse :: [Int] -> [Int]
-- testing 60 combinations of argument values
-- looking through 2 candidates of size 1
-- looking through 2 candidates of size 2
-- looking through 1 candidates of size 3
-- looking through 5 candidates of size 4
-- looking through 1 candidates of size 5
-- looking through 17 candidates of size 6
-- looking through 37 candidates of size 7
reverse xs  =  foldr (flip (++) . unit) [] xs

sort :: [Int] -> [Int]
-- testing 60 combinations of argument values
-- looking through 2 candidates of size 1
-- looking through 2 candidates of size 2
-- looking through 0 candidates of size 3
-- looking through 2 candidates of size 4
sort xs  =  foldr insert [] xs

(++) :: [Int] -> [Int] -> [Int]
-- testing 60 combinations of argument values
-- looking through 3 candidates of size 1
-- looking through 0 candidates of size 2
-- looking through 9 candidates of size 3
-- looking through 4 candidates of size 4
xs ++ ys  =  foldr (:) ys xs