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

Method replace

packages/effect/src/Optic.ts:1157–1159  ·  view source on GitHub ↗
(a: A, _: S)

Source from the content-addressed store, hash-verified

1155 this.set = set
1156 }
1157 override replace(a: A, _: S): S {
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 }

Callers

nothing calls this directly

Calls 1

setMethod · 0.65

Tested by

no test coverage detected