[Haskell-cafe] how to apply a function which returns IO() to a list?

developer at imaginando.net developer at imaginando.net
Wed Jun 14 05:46:38 EDT 2006


Hi,

I have this function which write a file:

writeHtml b x y = do
                        writeFile (b ++ ".html")  (htmlCode b x y)

i need to apply to each member of a given list:

the way i always try to codify functions in haskell is allways the same,
the most primitive one and i think i cant use it here.

writeList [] = ???
writeList (x:xs) = (writeHtml x) ???

How should i do this?

Many thx,

Nuno SAntos




More information about the Haskell-Cafe mailing list