Implemented the :first_match option of guards