It depends how much you mean "like" :). Usually whatever you would solve using a while loop in an imperative language is solved with recursion in Haskell.
The problem with directly having 'while' is that such a statement depends necessarily on mutable variables (otherwise, if the condition is 'true' at the start, it will never be 'false'). Moreover, there isn't usually a return value associated with a while statement. -- Hal Daume III | [EMAIL PROTECTED] "Arrest this man, he talks in maths." | www.isi.edu/~hdaume On Wed, 11 Jun 2003, Filip wrote: > I have a stupid question :) > Is there something like "while" loop in GHC ?? > > Thanks very much :) > _______________________________________________ > Haskell mailing list > [EMAIL PROTECTED] > http://www.haskell.org/mailman/listinfo/haskell > _______________________________________________ Haskell mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/haskell
