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

Method modify

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

Source from the content-addressed store, hash-verified

983 return Result.getOrElse(this.replaceResult(a, s), () => s)
984 }
985 modify(f: (a: A) => A): (s: S) => S {
986 return (s) => Result.getOrElse(Result.flatMap(this.getResult(s), (a) => this.replaceResult(f(a), s)), () => s)
987 }
988 compose(that: any): any {
989 return make(compose(this.node, that.node))
990 }

Callers

nothing calls this directly

Calls 1

fFunction · 0.50

Tested by

no test coverage detected