
21 Oct
2009
21 Oct
'09
4:57 p.m.
zaxis schrieb:
winSSQ count noRed noBlue = do { yesRed <- [1..33] \\ noRed; yesBlue <- [1..16] \\ noBlue; bracket (openFile "ssqNum.txt" WriteMode) (hClose) (\hd1 -> pickSSQ count yesRed yesBlue hd1); return ()
You might prefer 'withFile' or even better and if possible, write pickSSQ without IO interaction, just producing a String lazily and write this using writeFile.