import Tree completeBinaryTree n = makeTree 1 where makeTree x | x > n = Empty | otherwise = Branch 'x' (makeTree (2*x)) (makeTree (2*x+1)) isCompleteBinaryTree