๐Ÿ…ฟ๏ธIteratorProtocol

  • ๅ…ทๆœ‰ next() ๆ–นๆณ•็š„็‰ฉไปถๅฐฑๅฏ้ตๅพช IteratorProtocol๏ผŒไนŸๅฐฑๆ˜ฏไธ€ๅ€‹ iteratorใ€‚

  • ้กžไผผ JS ็š„ iterator protocolใ€‚

public protocol IteratorProtocol {
  associatedtype Element
  mutating func next() -> Element?
}

Last updated