add some Haskell Data.List-style goodness