pattern matching to pattern-matching