
2 May
2006
2 May
'06
3:45 a.m.
Evan Martin wrote:
I remember reading a tutorial that pointed out that you can often avoid explicit recusion in Haskell and instead use higher-level operators.
For your code, I think drawModals = foldr (flip (>>)) (return ()) . map drawModal works(?).
I think it would be foldl so that the (return()) would be nested as the leftmost element. Thanks for pointing out this point-free version of drawModals, although for readability at the moment I think I still prefer just to use mapM_ drawModal (reverse cs) Best regards, Brian.