arrow-fx / arrow.fx.extensions / IOBracket / guarantee
open fun <A> IOOf<A>.guarantee(finalizer: IOOf<Unit>): IO<A>
Executes the given finalizer when the source is finished, either in success or in error, or if cancelled.
As best practice, it’s not a good idea to release resources via guaranteeCase in polymorphic code.
Prefer bracket for the acquisition and release of resources.
See Also
Do you like Arrow?
✖