// tracing: off
import * as O from "../Option"
import { modify } from "./modify"
/**
 * Atomically modifies the `FiberRef` with the specified partial function and
 * returns the old value.
 * If the function is undefined on the current value it doesn't change it.
 */

export const getAndUpdateSome = (f) => modify((v) => [v, O.getOrElse_(f(v), () => v)])
//# sourceMappingURL=getAndUpdateSome.js.map
