MCPcopy
hub / github.com/Effect-TS/effect / [Symbol.iterator]

Function [Symbol.iterator]

packages/effect/src/Chunk.ts:147–159  ·  view source on GitHub ↗
(this: Chunk<A>)

Source from the content-addressed store, hash-verified

145 return Hash.cached(this, Hash.array(toReadonlyArray(this)))
146 },
147 [Symbol.iterator]<A>(this: Chunk<A>): Iterator<A> {
148 switch (this.backing._tag) {
149 case "IArray": {
150 return this.backing.array[Symbol.iterator]()
151 }
152 case "IEmpty": {
153 return emptyArray[Symbol.iterator]()
154 }
155 default: {
156 return toReadonlyArray(this)[Symbol.iterator]()
157 }
158 }
159 },
160 pipe<A>(this: Chunk<A>) {
161 return pipeArguments(this, arguments)
162 }

Callers

nothing calls this directly

Calls 1

toReadonlyArrayFunction · 0.85

Tested by

no test coverage detected