Latest 0.1.0
Homepage https://github.com/heshamsalman/Ranger
License MIT
Platforms ios 8.0
Authors

[![CI Status](http://img.shields.io/travis/Hesham Salman/Ranger.svg?style=flat)](https://travis-ci.org/Hesham Salman/Ranger)
Version
License
Platform

Usage

Ranger provides two new operators for reverse ranging:

  1. ..> which works as the inverse of ..<; max..>min is equivalent to min+1...max
  2. >>> 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.

Requirements

Swift 3

Installation

Ranger is available through CocoaPods. To install
it, simply add the following line to your Podfile:

pod "Ranger"

Author

Hesham Salman, [email protected]

License

Ranger is available under the MIT license. See the LICENSE file for more info.

Latest podspec

{
    "name": "Ranger",
    "version": "0.1.0",
    "summary": "Providing reverse range operators to Swift.",
    "description": "Swift, for an unsusual reason, doesn't allow easy creation of reverse ranges. This pod allows you to create a reverse range by simply using two new operators: `..>` and `>>>`.",
    "homepage": "https://github.com/heshamsalman/Ranger",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "Hesham Salman": "[email protected]"
    },
    "source": {
        "git": "https://github.com/heshamsalman/Ranger.git",
        "tag": "0.1.0"
    },
    "social_media_url": "https://twitter.com/whatsasoftware",
    "platforms": {
        "ios": "8.0"
    },
    "source_files": "Ranger/Classes/**/*",
    "pushed_with_swift_version": "3.0"
}

Pin It on Pinterest

Share This