packages feed

code-conjure-0.5.8: eg/bst.out

mem :: Int -> Tree -> Bool
-- testing 360 combinations of argument values
-- pruning with 20/30 rules
-- looking through 1 candidates of size 1
-- looking through 0 candidates of size 2
-- looking through 0 candidates of size 3
-- looking through 7 candidates of size 4
-- looking through 0 candidates of size 5
-- looking through 0 candidates of size 6
-- looking through 0 candidates of size 7
-- looking through 31 candidates of size 8
-- looking through 92 candidates of size 9
-- looking through 0 candidates of size 10
-- looking through 304 candidates of size 11
-- looking through 199 candidates of size 12
-- tested 501 candidates
mem x Leaf  =  False
mem x (Node t1 y t2)  =  mem x t1 || (mem x t2 || x == y)

mem :: Int -> Tree -> Bool
-- 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 0 candidates of size 3
-- looking through 4 candidates of size 4
-- looking through 0 candidates of size 5
-- looking through 0 candidates of size 6
-- looking through 6 candidates of size 7
-- looking through 24 candidates of size 8
-- looking through 0 candidates of size 9
-- looking through 192 candidates of size 10
-- looking through 0 candidates of size 11
-- looking through 384 candidates of size 12
-- tested 375 candidates
mem x Leaf  =  False
mem x (Node t1 y t2)  =  case x `compare` y of LT -> mem x t1; EQ -> True; GT -> mem x t2

insert :: Int -> Tree -> Tree
-- testing 360 combinations of argument values
-- pruning with 6/7 rules
-- looking through 2 candidates of size 1
-- looking through 2 candidates of size 2
-- looking through 0 candidates of size 3
-- looking through 8 candidates of size 4
-- looking through 21 candidates of size 5
-- looking through 0 candidates of size 6
-- looking through 86 candidates of size 7
-- looking through 239 candidates of size 8
-- looking through 104 candidates of size 9
-- looking through 1558 candidates of size 10
-- looking through 3555 candidates of size 11
-- looking through 4028 candidates of size 12
-- tested 9603 candidates
cannot conjure

before :: Int -> Tree -> Tree
-- pruning with 5/6 rules
-- looking through 2 candidates of size 1
-- looking through 2 candidates of size 2
-- looking through 0 candidates of size 3
-- looking through 8 candidates of size 4
-- looking through 21 candidates of size 5
-- looking through 0 candidates of size 6
-- looking through 86 candidates of size 7
-- looking through 239 candidates of size 8
-- looking through 104 candidates of size 9
-- looking through 1558 candidates of size 10
-- looking through 3555 candidates of size 11
-- looking through 4028 candidates of size 12
-- tested 9603 candidates
cannot conjure

before :: Int -> Tree -> Tree
-- pruning with 2/4 rules
-- looking through 2 candidates of size 1
-- looking through 2 candidates of size 2
-- looking through 0 candidates of size 3
-- looking through 8 candidates of size 4
-- looking through 21 candidates of size 5
-- looking through 0 candidates of size 6
-- looking through 68 candidates of size 7
-- looking through 287 candidates of size 8
-- looking through 32 candidates of size 9
-- looking through 1216 candidates of size 10
-- looking through 5103 candidates of size 11
-- looking through 1472 candidates of size 12
-- tested 8211 candidates
cannot conjure

beyond :: Int -> Tree -> Tree
-- pruning with 2/4 rules
-- looking through 2 candidates of size 1
-- looking through 2 candidates of size 2
-- looking through 0 candidates of size 3
-- looking through 8 candidates of size 4
-- looking through 21 candidates of size 5
-- looking through 0 candidates of size 6
-- looking through 68 candidates of size 7
-- looking through 287 candidates of size 8
-- looking through 32 candidates of size 9
-- looking through 1216 candidates of size 10
-- looking through 5103 candidates of size 11
-- looking through 1472 candidates of size 12
-- tested 8211 candidates
cannot conjure

union :: Tree -> Tree -> Tree
-- testing 360 combinations of argument values
-- pruning with 6/8 rules
-- looking through 3 candidates of size 1
-- looking through 11 candidates of size 2
-- looking through 32 candidates of size 3
-- looking through 84 candidates of size 4
-- looking through 470 candidates of size 5
-- looking through 1074 candidates of size 6
-- looking through 4088 candidates of size 7
-- looking through 16373 candidates of size 8
-- looking through 41366 candidates of size 9
-- tested 63501 candidates
cannot conjure