Avatar
norio_nomura 5/23/2017 7:52 AM
extension Collection { public func prefix(_ maxLength: Int) -> SubSequence { } } extension Sequence where SubSequence : Sequence, SubSequence.Iterator.Element == Iterator.Element, SubSequence.SubSequence == SubSequence { public func prefix(_ maxLength: Int) -> AnySequence<Iterator.Element> { } } extension Collection { public func map<T>( _ transform: (Iterator.Element) throws -> T ) rethrows -> [T] { } } extension Sequence { public func map<T>( _ transform: (Iterator.Element) throws -> T ) rethrows -> [T] { } } (edited)
7:53 AM
式の末端から型推測しようとしてるからぽい。