[Haskell-cafe] how to write a loop in haskell way

Ivan Lazar Miljenovic ivan.miljenovic at gmail.com
Sun Dec 19 12:07:11 CET 2010


On 19 December 2010 21:53, ender <crazyender at gmail.com> wrote:
>   Thanks for your quick reply. So recursive and monad is the proper
> way to simulate loop,right?

Well, recursion (either explicitly or implicitly via map, fold, etc.)
rather than iteration (i.e. a loop) is the usual approach in Haskell.

-- 
Ivan Lazar Miljenovic
Ivan.Miljenovic at gmail.com
IvanMiljenovic.wordpress.com



More information about the Haskell-Cafe mailing list