Improved matching a function definition