static var enumerate: AnySequence<Self> { return AnySequence { () -> AnyIterator<Self> in var i = startIndex return AnyIterator { () -> Self? in let element = Self(rawValue: i) i += 1 return element } } } public static var elements: [Self] { return Array(enumerate) } public static var count: Int { return elements.count } public static var startIndex: Int { return 0 } }
static var enumerate: AnySequence<Self> { return AnySequence { () -> AnyIterator<Self> in var i = startIndex return AnyIterator { () -> Self? in let element = Self(rawValue: i) i += 1 return element } } } public static var elements: [Self] { return Array(enumerate) } public static var count: Int { return elements.count } public static var startIndex: Int { return 0 } } FMFNFOUTྻ
static var enumerate: AnySequence<Self> { return AnySequence { () -> AnyIterator<Self> in var i = startIndex return AnyIterator { () -> Self? in let element = Self(rawValue: i) i += 1 return element } } } public static var elements: [Self] { return Array(enumerate) } public static var count: Int { return elements.count } public static var startIndex: Int { return 0 } } FOVNFSBUF 4FRVFODF ͔Β࡞ΒΕΔ
static var enumerate: AnySequence<Self> { return AnySequence { () -> AnyIterator<Self> in var i = startIndex return AnyIterator { () -> Self? in let element = Self(rawValue: i) i += 1 return element } } } public static var elements: [Self] { return Array(enumerate) } public static var count: Int { return elements.count } public static var startIndex: Int { return 0 } } FOVNFSBUF
var enumerate: AnySequence<Self> { return AnySequence { () -> AnyIterator<Self> in var i = startIndex return AnyIterator { () -> Self? in let element = Self(rawValue: i) i += 1 return element } } } public static var elements: [Self] { return Array(enumerate) } public static var count: Int { return elements.count } public static var startIndex: Int { return 0 } } ͜ͷϧʔϓOJMΛฦ͢ͱऴΘΓ OJMʹͳΔ·ͰͷཁૉͰྻΛ࡞Δ
var enumerate: AnySequence<Self> { return AnySequence { () -> AnyIterator<Self> in var i = startIndex return AnyIterator { () -> Self? in let element = Self(rawValue: i) i += 1 return element } } } public static var elements: [Self] { return Array(enumerate) } public static var count: Int { return elements.count } public static var startIndex: Int { return 0 } } 4FMG SBX7BMVF*OU Ͱ&MFNFOUΛ࡞Δ ରԠ͢Δͷ͕ͳ͔ͬͨΒOJM
var enumerate: AnySequence<Self> { return AnySequence { () -> AnyIterator<Self> in var i = startIndex return AnyIterator { () -> Self? in let element = Self(rawValue: i) i += 1 return element } } } public static var elements: [Self] { return Array(enumerate) } public static var count: Int { return elements.count } public static var startIndex: Int { return 0 } } ࿈൪Ͱ͋ΕJODSFNFOU͍͚ͯ͠ ࣍ͷ&MFNFOU͕࡞ΒΕΔ
var enumerate: AnySequence<Self> { return AnySequence { () -> AnyIterator<Self> in var i = startIndex return AnyIterator { () -> Self? in let element = Self(rawValue: i) i += 1 return element } } } public static var elements: [Self] { return Array(enumerate) } public static var count: Int { return elements.count } public static var startIndex: Int { return 0 } } ࿈൪Ͱ͋ΕJODSFNFOU͍͚ͯ͠ ࣍ͷ&MFNFOU͕࡞ΒΕΔ