Embed presentation
Download to read offline


![ObjectRange Examples; 1)$A($R( 1 , 5 )).join( ', ' ) // -> '1, 2, 3, 4, 5' 2) 2) $R( 1 , 5 ).zip([ 'one' , 'two' , 'three' , 'four' , 'five' ], function (tuple) { return tuple.join( ' = ' ); }) // > ['1 = one', '2 = two', '3 = three', '4 = four', '5 = five'] 3)$A($R( 'a' , 'e' )) // -> ['a', 'b', 'c', 'd', 'e'], no surprise there](https://image.slidesharecdn.com/object-range-1225166610728971-9/85/Object-Range-3-320.jpg)


ObjectRange represents an interval of values that have a valid strict weak ordering. It mixes in Enumerable, making ranges versatile. The preferred way to obtain a range is to use the $R utility function. ObjectRange overrides the default include method, allowing it to use a maximum of two comparisons to determine if a value is included in the range.


![ObjectRange Examples; 1)$A($R( 1 , 5 )).join( ', ' ) // -> '1, 2, 3, 4, 5' 2) 2) $R( 1 , 5 ).zip([ 'one' , 'two' , 'three' , 'four' , 'five' ], function (tuple) { return tuple.join( ' = ' ); }) // > ['1 = one', '2 = two', '3 = three', '4 = four', '5 = five'] 3)$A($R( 'a' , 'e' )) // -> ['a', 'b', 'c', 'd', 'e'], no surprise there](https://image.slidesharecdn.com/object-range-1225166610728971-9/85/Object-Range-3-320.jpg)
