altFromList es
    | even (length xs) = merge x (wrapup xs)
    | otherwise        = wrapup (x:xs)
  where
    (x:xs) = fmap singleton es

    foldup []     = []
    foldup (_:[]) = []
    foldup (z0:z1:zs) = merge z0 z1 : foldup zs

    wrapup [z] = z
    wrapup zs  = wrapup (foldup zs)
altFromList es
    | even (length xs) = merge x (wrapup xs)
    | otherwise        = wrapup (x:xs)
  where
    (x:xs) = fmap singleton es

    foldup []     = []
    foldup (_:[]) = []
    foldup (z0:z1:zs) = merge z0 z1 : foldup zs

    wrapup [z] = z
    wrapup zs  = wrapup (foldup zs)
altFromList es
    | even (length xs) = merge x (wrapup xs)
    | otherwise        = wrapup (x:xs)
  where
    (x:xs) = fmap singleton es

    foldup []     = []
    foldup (_:[]) = []
    foldup (z0:z1:zs) = merge z0 z1 : foldup zs

    wrapup [z] = z
    wrapup zs  = wrapup (foldup zs)