arrow-fx / arrow.fx / IO / bracket
fun <B> bracket(release: (A) -> IOOf<Unit>, use: (A) -> IOOf<B>): IO<B>
Meant for specifying tasks with safe resource acquisition and release in the face of errors and interruption.
It would be the the equivalent of try/catch/finally statements in mainstream imperative languages for resource
acquisition and release.
release - is the action that’s supposed to release the allocated resource after use is done, irregardless
of its exit condition.
Do you like Arrow?
✖