bracket<A, B> function
Implementation
IO<B> Function(IO<A>) bracket<A, B>({
required IO<void> Function(A) release,
required IO<B> Function(A) use,
}) =>
(acquire) => () {
final resource = acquire();
try {
return use(resource)();
} finally {
release(resource)();
}
};