+// FIXME: replace this with a computed var named `...` when the language makes +// that possible. +public enum UnboundedRange_ { + public static postfix func ... (_: UnboundedRange_) -> () { + fatalError("uncallable") + } +} +public typealias UnboundedRange = (UnboundedRange_)->() + public subscript(x: UnboundedRange) -> SubSequence { + get { + return self[startIndex...] + } + set { + self[startIndex...] = newValue + } + }
...
は 演算子で、 形式的に UnmoundedRange_
を引数1個取って消化する関数でsubscript
は、 UnboundedRange_
を消化する関数を受け取るオーバーロードなのか。