[Haskell-cafe] IO in lists
Joachim Breitner
mail at joachim-breitner.de
Tue Jan 16 11:30:58 EST 2007
Hi again,
if sequence' should work with empty lists, then better write it like
this:
sequence' ms = foldr k (return []) ms
where
k m m' = do { x <- m; xs <- unsafeInterleaveIO m'; return (x:xs) }
Joachim
--
Joachim "nomeata" Breitner
mail: mail at joachim-breitner.de | ICQ# 74513189 | GPG-Key: 4743206C
JID: joachimbreitner at amessage.de | http://www.joachim-breitner.de/
Debian Developer: nomeata at debian.org
More information about the Haskell-Cafe
mailing list