@effect-ts/system
Version:
Effect-TS is a zero dependency set of libraries to write highly productive, purely functional TypeScript at scale.
10 lines (9 loc) • 334 B
JavaScript
// ets_tracing: off
import * as Tp from "../Collections/Immutable/Tuple/index.mjs";
import { modify } from "./modify.mjs";
/**
* Atomically modifies the `FiberRef` with the specified function and returns
* the old value.
*/
export const getAndUpdate = f => modify(v => Tp.tuple(v, f(v)));
//# sourceMappingURL=getAndUpdate.mjs.map