[Haskell-beginners] pattern matching on a common element