[Haskell-beginners] short function to remove and replace an item