MCPcopy Create free account
hub / github.com/effect-app/libs / updateWith

Function updateWith

packages/effect-app/src/Pure.ts:224–229  ·  view source on GitHub ↗
(upd: (s: S2) => S3)

Source from the content-addressed store, hash-verified

222}
223
224export function updateWith<S2, S3>(upd: (s: S2) => S3) {
225 return modify((_: S2) => {
226 const r = upd(_)
227 return tuple(r, r)
228 })
229}
230
231export function updateWithEffect<W, R, E, S2, S3>(
232 upd: (s: S2, log: (evt: W) => PureLogT<W>) => Effect.Effect<S3, E, FixEnv<R, W, S2, S3>>

Callers

nothing calls this directly

Calls 3

tupleFunction · 0.90
updFunction · 0.85
modifyFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…