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

Function iterateOver

test/README.example.spec.ts:526–531  ·  view source on GitHub ↗
(iterable: Iterable<T>)

Source from the content-addressed store, hash-verified

524 const iterate = <T>(value: T) => effect("iterate")<[value: T], void>(value);
525
526 const iterateOver = <T>(iterable: Iterable<T>): Effected<Iterate<T>, void> =>
527 effected(function* () {
528 for (const value of iterable) {
529 yield* iterate(value);
530 }
531 });
532
533 const logSpy = vi.spyOn(console, "log").mockImplementation(() => {});
534 let i = 0;

Callers 1

Calls 2

effectedFunction · 0.90
iterateFunction · 0.70

Tested by

no test coverage detected