Inline the evaluation of the range anonymous functions

This was a major performance bottleneck