Simplify implementation of __.range