When given a pattern, returns a function that, given data, identifies if the pattern matches the data.