[Haskell-cafe] Haskell vs OCaml

Branimir Maksimovic bmaxa at hotmail.com
Sun Dec 25 06:09:51 EST 2005




>From: Lemmih <lemmih at gmail.com>
>To: Branimir Maksimovic <bmaxa at hotmail.com>
>CC: lennart at augustsson.net, Haskell-Cafe at haskell.org
>Subject: Re: [Haskell-cafe] Haskell vs OCaml
>Date: Sun, 25 Dec 2005 11:43:56 +0100
>
>On 12/25/05, Branimir Maksimovic <bmaxa at hotmail.com> wrote:
> >
> >
> >
> > >From: Lennart Augustsson <lennart at augustsson.net>
> > >To: Branimir Maksimovic <bmaxa at hotmail.com>
> > >CC: daniel.carrera at zmsl.com, Haskell-Cafe at haskell.org
> > >Subject: Re: [Haskell-cafe] Haskell vs OCaml
> > >Date: Sun, 25 Dec 2005 10:25:44 +0100
> > >
> > >Branimir Maksimovic wrote:
> > >>I've found that Haskell is pretty good in implementing recursive
> > >>algorithms.
> > >>Problem cames when one want's to implement non recursive algorithm
> > >>by terms of recursion as Haskell does not support loops.
> > >>Perhaps if we can get loops, situation will improve, but then that
> > >>wouldn't be functional style.
> > >
> > >Could you give an example of a loop you find awkward in Haskell?
> >
> > Well I want simple loop for(int i =0;i<10;++i)doSomething(i);
> > in haskell that would be
> > for begin end f | begin /= end = do  {f begin ; for (begin+1) end f}
> >                       | otherwise = return ()
> >
>
>Or just 'mapM_ doSomething [1..10]' (:

Neet! However would it be more efficient for, say, 1 million iterations?
Anyway I have to look for map functions. I'm learning step by step
from tutorials :)

Greetings, Bane.


>
> > >I've often found that you can just define a control construct
> > >in Haskell when needed (e.g., some kind of loop).
> >
> > I don't know how to do that.
> >
> > Greetings, Bane.
> >
> > _________________________________________________________________
> > Express yourself instantly with MSN Messenger! Download today it's FREE!
> > http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/
> >
> > _______________________________________________
> > Haskell-Cafe mailing list
> > Haskell-Cafe at haskell.org
> > http://www.haskell.org/mailman/listinfo/haskell-cafe
> >
>
>
>--
>Friendly,
>   Lemmih

_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today it's FREE! 
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/



More information about the Haskell-Cafe mailing list