packages feed

code-conjure-0.5.8: eg/sort.out

sort :: [Int] -> [Int]
-- testing 360 combinations of argument values
-- pruning with 6/7 rules
-- looking through 2 candidates of size 1
-- looking through 3 candidates of size 2
-- looking through 5 candidates of size 3
-- looking through 12 candidates of size 4
-- looking through 23 candidates of size 5
-- tested 24 candidates
sort []  =  []
sort (x:xs)  =  insert x (sort xs)

sort :: [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 1 candidates of size 3
-- looking through 4 candidates of size 4
-- tested 6 candidates
sort xs  =  foldr insert [] xs

qsort :: [Int] -> [Int]
-- testing 360 combinations of argument values
-- pruning with 8/8 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 6 candidates of size 5
-- looking through 9 candidates of size 6
-- looking through 22 candidates of size 7
-- looking through 37 candidates of size 8
-- looking through 84 candidates of size 9
-- looking through 169 candidates of size 10
-- looking through 352 candidates of size 11
-- looking through 767 candidates of size 12
-- looking through 1600 candidates of size 13
-- looking through 3499 candidates of size 14
-- tested 3668 candidates
qsort []  =  []
qsort (x:xs)  =  filter (x >) (qsort xs) ++ (x:filter (x <=) (qsort xs))

merge :: [Int] -> [Int] -> [Int]
-- testing 360 combinations of argument values
-- pruning with 4/4 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
-- looking through 383 candidates of size 7
-- looking through 375 candidates of size 8
-- looking through 1263 candidates of size 9
-- looking through 2252 candidates of size 10
-- looking through 4090 candidates of size 11
-- looking through 13481 candidates of size 12
-- tested 22094 candidates
cannot conjure