
14 Jun
2006
14 Jun
'06
11:32 a.m.
"developer" == developer
writes:
developer> Hi, I have this function which write a file: developer> writeHtml b x y = do writeFile (b ++ ".html") (htmlCode b x developer> y) developer> i need to apply to each member of a given list: developer> the way i always try to codify functions in haskell is developer> allways the same, the most primitive one and i think i cant developer> use it here. developer> writeList [] = ??? developer> writeList (x:xs) = (writeHtml x) ??? writeList [] = return () writeList (x:xs) = do writeHtml x writeList xs -- WBR, Max Vasin.