I've been playing with the Monadic I/O system set out in Simon and Phil's paper ``Imperative Functional Programming'', and I have built a simple implementation for the Haskell B compiler. (There _is_ a good reason why I didn't just use Glasgow's compiler.) I have the basic functionality working, with a version of the "echo" program working, running only 100 times slower than a program which comes with UNIX, written in C, which has similar functionality. Anyway, I'm looking for ideas on the best way to implement the obvious function with this type: > dialogueIO :: [Request] -> IO [Response] Where, because the low-level implementation is based on Dialogues, this makes some sense. More generally, how would one write a "mapIO" function, with type: > mapIO: (a -> IO b) -> [a] -> IO [b] My functional programming has become a little rusty, and I can't work my head round a way of writing this function without some strange contortions that I am too embarrased to talk about in this public forum. Any help would be appreciated. Thanks, Duncan Sinclair. <[EMAIL PROTECTED]>