Implementation of while loop

2003-11-16 Thread r2yang
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
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell


Re: Implementation of while loop

2003-11-17 Thread Abraham Egnor
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

[EMAIL PROTECTED] 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
>[EMAIL PROTECTED]
>http://www.haskell.org/mailman/listinfo/haskell
>



___
Haskell mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell