[Haskell-beginners] [Haskell-cafe] select :: [(Float, a)] -> a -- Weighted stochastic selection - help?

Nicolas Pouillard nicolas.pouillard at gmail.com
Sat Sep 6 11:50:59 EDT 2008

Excerpts from C.M.Brown's message of Sat Sep 06 17:33:58 +0200 2008:
> Nicolas,
> > Yes
> >
> > > I feel, also, that as a reasonably experienced Haskell user, I am getting
> > > confused with what should be fundamental Haskell concepts. Perhaps these
> > > concepts should be made much clearer to beginners in the first instance.
> >
> > This article [1] seems a good introduction. Maybe one could sum-up what you
> > think is missing from this article and extend it a bit.
> >
> > For instance one could explain the point about the run-time system.
> Although what you've told me may be true (and I thank you for your
> explanation), I'm still not at all convinced that it's useful to think of
> IO as being pure. It still produces an effect if I evaluate it, no matter
> how we sugar-coat these things.
> I like the idea of the type system flagging the function as being
> effect-full by the IO - and find that more useful than thinking about
> runtime systems.

Once we've understood that monads (even the IO) is not an exception in
the *language*, but that's the runtime system that consume and evaluate
IO values starting from main.

Then one could think in a more pragmatic way: IO is effect-full, and non
IO is pure, that the type system help us to separate effects from pure code...

Nicolas Pouillard aka Ertai
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 194 bytes
Desc: not available
Url : http://www.haskell.org/pipermail/beginners/attachments/20080906/05aafec6/signature-0001.bin

More information about the Beginners mailing list