// ets_tracing: off
import * as O from "../../Option";
import * as T from "../deps-core";
import { addIfOpen } from "./addIfOpen";
import { release } from "./release";
export function add(finalizer) {
  return _ => T.map_(addIfOpen(finalizer)(_), O.fold(() => () => T.unit, k => e => release(k, e)(_)));
}
//# sourceMappingURL=add.js.map