Support matching functions taking 2 parameters, implement ranges