As patterns example haskell