[Haskell-beginners] Does this function already exist in one of the standard modules?