Why Nostr? What is Njump?
2024-11-06 14:04:01

Philipp :emacs: :nixos: on Nostr: In #haskell, is there a version of "bracket" that works on lists? Say I give it a ...

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. 🥲
Author Public Key
npub14390lt6sxddk9xqlurll7czeunakr86fxnt0gqyzzadvhpmn0e0sr39lnk