packages feed

code-conjure-0.3.4: eg/tree.out

leftmost :: Tree -> Int
-- testing 60 combinations of argument values
-- looking through 0 candidates of size 1
-- looking through 1 candidates of size 2
-- looking through 2 candidates of size 3
-- looking through 4 candidates of size 4
-- looking through 8 candidates of size 5
-- looking through 16 candidates of size 6
-- looking through 32 candidates of size 7
-- looking through 68 candidates of size 8
-- looking through 152 candidates of size 9
leftmost x  =  if nil (left x) then valu x else leftmost (left x)

rightmost :: Tree -> Int
-- testing 60 combinations of argument values
-- looking through 0 candidates of size 1
-- looking through 1 candidates of size 2
-- looking through 2 candidates of size 3
-- looking through 4 candidates of size 4
-- looking through 8 candidates of size 5
-- looking through 16 candidates of size 6
-- looking through 32 candidates of size 7
-- looking through 68 candidates of size 8
-- looking through 152 candidates of size 9
rightmost x  =  if nil (right x) then valu x else rightmost (right x)

size :: Tree -> Int
-- testing 60 combinations of argument values
-- looking through 2 candidates of size 1
-- looking through 0 candidates of size 2
-- looking through 1 candidates of size 3
-- looking through 0 candidates of size 4
-- looking through 1 candidates of size 5
-- looking through 0 candidates of size 6
-- looking through 9 candidates of size 7
-- looking through 32 candidates of size 8
-- looking through 109 candidates of size 9
-- looking through 304 candidates of size 10
-- looking through 817 candidates of size 11
-- looking through 2080 candidates of size 12
-- looking through 5165 candidates of size 13
size x  =  if nil x then 0 else 1 + (size (left x) + size (right x))

height :: Tree -> Int
-- testing 60 combinations of argument values
-- looking through 3 candidates of size 1
-- looking through 0 candidates of size 2
-- looking through 2 candidates of size 3
-- looking through 0 candidates of size 4
-- looking through 2 candidates of size 5
-- looking through 0 candidates of size 6
-- looking through 21 candidates of size 7
-- looking through 48 candidates of size 8
-- looking through 239 candidates of size 9
-- looking through 656 candidates of size 10
-- looking through 2149 candidates of size 11
-- looking through 5704 candidates of size 12
-- looking through 16380 candidates of size 13
height x  =  if nil x then -1 else 1 + max (height (left x)) (height (right x))

mem :: Int -> Tree -> Bool
-- testing 60 combinations of argument values
-- looking through 1 candidates of size 1
-- looking through 1 candidates of size 2
-- looking through 2 candidates of size 3
-- looking through 6 candidates of size 4
-- looking through 12 candidates of size 5
-- looking through 28 candidates of size 6
-- looking through 64 candidates of size 7
-- looking through 156 candidates of size 8
-- looking through 376 candidates of size 9
-- looking through 926 candidates of size 10
-- looking through 2280 candidates of size 11
-- looking through 5648 candidates of size 12
cannot conjure

insert :: Int -> Tree -> Bool
-- testing 60 combinations of argument values
-- looking through 0 candidates of size 1
-- looking through 1 candidates of size 2
-- looking through 4 candidates of size 3
-- looking through 16 candidates of size 4
-- looking through 36 candidates of size 5
-- looking through 90 candidates of size 6
-- looking through 205 candidates of size 7
-- looking through 497 candidates of size 8
-- looking through 1199 candidates of size 9
cannot conjure