static Matches ai_matchPattern(S pat, S input) { pat = quoteUnlessQuoted(pat); S function = ai_forward(pat, "can be matched with"); function = "get" + firstToUpper(function); if (!has_verified(function, "is", "a safe function to call")) fail("no mama: " + function); ret (Matches) quickImport(callAndMake(function, unquote(pat), input)); }