MCPcopy Create free account
hub / github.com/Effect-TS/effect / forEach

Method forEach

packages/effect/src/Optic.ts:841–841  ·  view source on GitHub ↗

* Focuses **all elements** of an array-like focus and optionally narrows * to a subset using an element-level optic. * Available only on Traversal (i.e. when `A` is * `ReadonlyArray `). Returns a new Traversal focused on the * selected elements. * * **Details** *

(this: Traversal<S, A>, f: (iso: Iso<A, A>) => Optional<A, B>)

Source from the content-addressed store, hash-verified

839 * @see `.modifyAll()` — apply a function to every focused element
840 */
841 forEach<S, A, B>(this: Traversal<S, A>, f: (iso: Iso<A, A>) => Optional<A, B>): Traversal<S, B>
842
843 /**
844 * Applies a function to **every** element focused by the traversal.

Callers 15

Codegen.tsFile · 0.65
codegen.tsFile · 0.65
main.tsFile · 0.65
operationToImplFunction · 0.65
Generator.tsFile · 0.65
Discovery.tsFile · 0.65
addMembersFunction · 0.65
addNamespacesFunction · 0.65
buildJSDocApisFunction · 0.65
main.tsFile · 0.65
printFunction · 0.65
Core.tsFile · 0.65

Implementers 1

OptionalImplpackages/effect/src/Optic.ts

Calls

no outgoing calls

Tested by 4

printFunction · 0.52
withRestoredIsTTYFunction · 0.52
withRestoredIsTerminalFunction · 0.52
yieldNowNFunction · 0.52