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

Method modifyAll

packages/effect/src/Optic.ts:1114–1120  ·  view source on GitHub ↗
(this: Traversal<S, A>, f: (a: A) => A)

Source from the content-addressed store, hash-verified

1112 )
1113 }
1114 modifyAll<S, A>(this: Traversal<S, A>, f: (a: A) => A): (s: S) => S {
1115 return (s) =>
1116 Result.getOrElse(
1117 Result.flatMap(this.getResult(s), (as) => this.replaceResult(as.map(f), s)),
1118 () => s
1119 )
1120 }
1121}
1122
1123class IsoImpl<S, A> extends OptionalImpl<S, A> implements Iso<S, A> {

Callers

nothing calls this directly

Calls 1

mapMethod · 0.45

Tested by

no test coverage detected