"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.updateSome = void 0;
const Option_1 = require("../Option");
const modify_1 = require("./modify");
/**
 * Atomically modifies the `FiberRef` with the specified partial function.
 * If the function is undefined on the current value it doesn't change it.
 */
function updateSome(f) {
    return (0, modify_1.modify)((v) => [undefined, (0, Option_1.getOrElse_)(f(v), () => v)]);
}
exports.updateSome = updateSome;
//# sourceMappingURL=updateSome.js.map