
25 Dec
2005
25 Dec
'05
7:02 a.m.
Branimir Maksimovic wrote:
Well I want simple loop for(int i =0;i<10;++i)doSomething(i); in haskell that would be for begin end f | begin /= end = do {f begin ; for (begin+1) end f} | otherwise = return ()
How about: result = [ doSomething(i) | i <- [0..9] ] I guess it depends on what doSomething() does. Cheers, Daniel. -- /\/`) http://oooauthors.org /\/_/ http://opendocumentfellowship.org /\/_/ \/_/ I am not over-weight, I am under-tall. /