MCPcopy Create free account
hub / github.com/Snowflyt/tinyeffect / iterateOver

Function iterateOver

test/README.example.proof.ts:286–291  ·  view source on GitHub ↗
(iterable: Iterable<T>)

Source from the content-addressed store, hash-verified

284 const iterate = <T>(value: T) => effect("iterate")<[value: T], void>(value);
285
286 const iterateOver = <T>(iterable: Iterable<T>) =>
287 effected(function* () {
288 for (const value of iterable) {
289 yield* iterate(value);
290 }
291 });
292
293 expect(iterateOver).to(equal<<T>(iterable: Iterable<T>) => Effected<Iterate<T>, void>>);
294

Callers 1

Calls 2

effectedFunction · 0.90
iterateFunction · 0.70

Tested by

no test coverage detected