[![CI Status](http://img.shields.io/travis/Hesham Salman/Ranger.svg?style=flat)](https://travis-ci.org/Hesham Salman/Ranger)
Ranger provides two new operators for reverse ranging:
..>
which works as the inverse of..<
;max..>min
is equivalent tomin+1...max
>>>
which works the same as...
but allows for the lhs to be smaller than rhs --max>>>min
is equivalent to(min...max).reversed()
So you may be asking, "Why would I want to use this instead of calling reversed()
?"
Good question! Calling reversed()
or reverse()
is much slower than using a stride, as I'm doing in this framework. And the stride function is unusually long, especially for these commonplace operations.
Swift 3
Ranger is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod "Ranger"
Hesham Salman, [email protected]
Ranger is available under the MIT license. See the LICENSE file for more info.