treeIter :: [Int] -> Tree
treeIter = head . iter . map Leaf
  where 
    iter []  = []
    iter [t] = [t]
    iter (xt:yt:ts) = iter (Fork xt yt : iter ts)

-- First steps
treeIter :: [Int] -> Tree
treeIter = head . iter . map Leaf
  where 
    iter []  = []
    iter [t] = [t]
    iter (xt:yt:ts) = iter (Fork xt yt : iter ts)

-- First steps
treeIter = head . iter . map Leaf
  where 
    iter []  = []
    iter [t] = [t]
    iter (xt:yt:ts) = iter (Fork xt yt : iter ts)

-- First steps