rearrange :: [a] -> [a]
rearrange = uncurry (++) . divide
  where
    divide [] = ([],[])
    divide (x:y:as) = (x:xs', y:ys')
      where
        (xs',ys') = divide as
    divide _ = error "list length is odd"
rearrange :: [a] -> [a]
rearrange = uncurry (++) . divide
  where
    divide [] = ([],[])
    divide (x:y:as) = (x:xs', y:ys')
      where
        (xs',ys') = divide as
    divide _ = error "list length is odd"
rearrange = uncurry (++) . divide
  where
    divide [] = ([],[])
    divide (x:y:as) = (x:xs', y:ys')
      where
        (xs',ys') = divide as
    divide _ = error "list length is odd"