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

Method modify

packages/effect/src/Optic.ts:1160–1162  ·  view source on GitHub ↗
(f: (a: A) => A)

Source from the content-addressed store, hash-verified

1158 return this.set(a)
1159 }
1160 override modify(f: (a: A) => A): (s: S) => S {
1161 return (s) => Result.getOrElse(Result.map(this.getResult(s), (a) => this.set(f(a))), () => s)
1162 }
1163}
1164
1165function make(node: Node): any {

Callers

nothing calls this directly

Calls 3

setMethod · 0.65
fFunction · 0.50
mapMethod · 0.45

Tested by

no test coverage detected