Created
June 14, 2016 10:31
-
-
Save Gujci/b8dc5c5b177003b0a8d6958b46755a20 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
extension Range: IntegerLiteralConvertible { | |
public init(integerLiteral value: Int) { | |
self = (value as! Element).rangeValue | |
} | |
} | |
extension ForwardIndexType { | |
var rangeValue: Range<Self> { | |
return self...self | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment