In #haskell, is there a version of "bracket" that works on lists? Say I give it a list [a] and "acquire :: a -> IO b" as well as "release :: a -> IO c" and it'll try to acquire "IO [b]" and if one of the acquires fails, rolls back the already acquired resources?
I could fiddle around with resourcet, but is that the only option? For now, my custom-made function for this makes me uneasy. 🥲
@dpwiz I think this doesn't make sense in my case. This would acquire all the resources, get the "result" and release the resource immediately. It's a use case, just not my use case. I want to acquire all the resources, do something with all at once, and then release them all at once.
@dpwiz I think this doesn't make sense in my case. This would acquire all the resources, get the "result" and release the resource immediately. It's a use case, just not my use case. I want to acquire all the resources, do something with all at once, and then release them all at once.