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.
/
_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe