While learning haskell I couldn\'t understand how haskell was automatically able to match a pattern where the head of a list is extracted.