"use strict"
Object.defineProperty(exports, "__esModule", { value: true })
exports.updateAndGet = void 0
// tracing: off
const modify_1 = require("./modify")
/**
 * Atomically modifies the `FiberRef` with the specified function and returns
 * the result.
 */
function updateAndGet(f) {
  return (0, modify_1.modify)((v) => {
    const result = f(v)
    return [result, result]
  })
}
exports.updateAndGet = updateAndGet
//# sourceMappingURL=updateAndGet.js.map
