Implementation of while loop

Abraham Egnor aegnor at antioch-college.edu
Mon Nov 17 09:29:35 EST 2003


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 at 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 at haskell.org
>http://www.haskell.org/mailman/listinfo/haskell
>





More information about the Haskell mailing list