
15 Nov
2010
15 Nov
'10
6:14 p.m.
Hi!
On Mon, Nov 15, 2010 at 9:07 PM, C. McCann
Isn't this mostly a reimplementation of mapM? Given a list of [IO Growable], you map over it to put a bracket around each one, then sequence the result
No. There is a trick. It stacks up attach and deattach. So if for third attach something fails then both deattach for second and first nerve is called. In your example this would not happen. So the idea is that in a case of an error all computations (which are of some type class which defines necessary prepare and cleanup functions) are "unwinded". In a case of success the resulting list is returned. Mitar