Hi,does any one knows how to implement while-do loop or nested while-do loop? I'm in a situation that I need to implement nested while do loop with some if- then-else condition in my code,but I have no idea about it.Thanks. Ray ---------------------------------------- This mail sent through www.mywaterloo.ca
While "while" can be implemented in haskell, I would strongly suggest you look at using the many higher-order functions available (foldl/foldr, map, filter, etc.) - they're much more in line with the spirit of the language, and will lend themselves to much clearer expressions once you get the hang of them. What sort of thing do you want to do in your while loop? Is it a pure processing function, or an IO-related one? Abe r2yang@engmail.uwaterloo.ca writes:
Hi,does any one knows how to implement while-do loop or nested while-do loop? I'm in a situation that I need to implement nested while do loop with some if- then-else condition in my code,but I have no idea about it.Thanks.
Ray
---------------------------------------- This mail sent through www.mywaterloo.ca _______________________________________________ Haskell mailing list Haskell@haskell.org http://www.haskell.org/mailman/listinfo/haskell
participants (2)
-
Abraham Egnor -
r2yang@engmail.uwaterloo.ca