fromThese :: A -> B -> These A B -> (A,B)
-- testing 4 combinations of argument values
-- pruning with 0/0 rules
-- 0 candidates of size 1
-- 0 candidates of size 2
-- 1 candidates of size 3
-- 0 candidates of size 4
-- 0 candidates of size 5
-- 0 candidates of size 6
-- 0 candidates of size 7
-- 0 candidates of size 8
-- 0 candidates of size 9
-- 15 candidates of size 10
-- tested 16 candidates
fromThese x y None  =  (x,y)
fromThese x y (This z)  =  (z,y)
fromThese x y (That z)  =  (x,z)
fromThese x y (These z x')  =  (z,x')

listhese :: These A A -> [A]
-- testing 3 combinations of argument values
-- pruning with 0/0 rules
-- 1 candidates of size 1
-- 0 candidates of size 2
-- 0 candidates of size 3
-- 4 candidates of size 4
-- 0 candidates of size 5
-- 11 candidates of size 6
-- 0 candidates of size 7
-- 26 candidates of size 8
-- 0 candidates of size 9
-- 57 candidates of size 10
-- tested 83 candidates
listhese None  =  []
listhese (This x)  =  [x]
listhese (That x)  =  [x]
listhese (These x y)  =  [x,y]

cathis :: [These A B] -> [A]
-- testing 5 combinations of argument values
-- pruning with 3/3 rules
-- 1 candidates of size 1
-- 0 candidates of size 2
-- 0 candidates of size 3
-- 0 candidates of size 4
-- 1 candidates of size 5
-- 1 candidates of size 6
-- 2 candidates of size 7
-- 2 candidates of size 8
-- 3 candidates of size 9
-- 6 candidates of size 10
-- 8 candidates of size 11
-- tested 17 candidates
cathis []  =  []
cathis (t:ts)  =  if isThis t
                  then fromThis t:cathis ts
                  else cathis ts

cathat :: [These A B] -> [B]
-- testing 4 combinations of argument values
-- pruning with 3/3 rules
-- 1 candidates of size 1
-- 0 candidates of size 2
-- 0 candidates of size 3
-- 0 candidates of size 4
-- 1 candidates of size 5
-- 1 candidates of size 6
-- 2 candidates of size 7
-- 2 candidates of size 8
-- 3 candidates of size 9
-- 6 candidates of size 10
-- 8 candidates of size 11
-- tested 17 candidates
cathat []  =  []
cathat (t:ts)  =  if isThat t
                  then fromThat t:cathat ts
                  else cathat ts

cathese :: [These A A] -> [A]
-- testing 5 combinations of argument values
-- pruning with 7/7 rules
-- 1 candidates of size 1
-- 0 candidates of size 2
-- 0 candidates of size 3
-- 0 candidates of size 4
-- 2 candidates of size 5
-- 3 candidates of size 6
-- 4 candidates of size 7
-- 8 candidates of size 8
-- 17 candidates of size 9
-- 36 candidates of size 10
-- 54 candidates of size 11
-- 119 candidates of size 12
-- 268 candidates of size 13
-- 490 candidates of size 14
-- 985 candidates of size 15
-- tested 1987 candidates
cannot conjure

