prefix
は public func prefix(_ maxLength: Int) -> AnySequence<Iterator.Element> { _precondition(maxLength >= 0, "Can't take a prefix of negative length from a sequence") if maxLength == 0 { return AnySequence(EmptyCollection<Iterator.Element>()) } return AnySequence( _PrefixSequence(_iterator: makeIterator(), maxLength: maxLength)) }
の makeIterator
を AnySequence
に渡すために SubSequence.SubSequence == SubSequence
が必要で_PrefixSequence
に渡すのに必要なのか (edited)Sequence
に入れられるんだから