Skip to content

Instantly share code, notes, and snippets.

View rpomeroy's full-sized avatar

Ron Pomeroy rpomeroy

View GitHub Profile
protocol ArrayRepresentable {
typealias ArrayType
func toArray() -> ArrayType[]
}
extension Range : ArrayRepresentable {
func toArray() -> T[] {
return T[](self)
}