I would like this code to be as similar as possible to Wolfram Mathematica function declarations. In case of a failed pattern recognition, MMA returns an unevaluated function. Maybe that could be the case?