[Haskell-beginners] How to solve this using State Monad?

Ertugrul Söylemez es at ertes.de
Sat Jun 2 14:02:50 CEST 2012


Rustom Mody <rustompmody at gmail.com> wrote:

> > I have started an arrow tutorial which many people found easy to
> > follow. It's not finished yet, but since so many people found it
> > useful I'm sharing that unfinished tutorial:
> >
> >    <http://ertes.de/new/tutorials/arrows.html>
> >
> > It answers the most important questions:  What?  Why?  How?  To some
> > extent it also answers:  When?  But I have to work on that question.
>
> As usual this is useful and I'll be studying it in more detail.  For
> now a general question: What do you think of *teaching* Haskell
> replacing monads with arrows in the early introduction?

According to my experience the same rule that applies to monads also
applies to arrows.  In other words:  If you can teach monads, you likely
also can teach arrows.  If you can't teach monads, don't try to teach
arrows either.

My current position is that understanding applicative functors and
monads makes it much easier to learn arrows.  But there is also strong
evidence that teaching arrows first might be useful, building on the
correspondence between Category+Applicative and Arrow.  I have not
tried this though.

About my approach to teaching monads there has been a discussion on
Reddit recently:

    <http://www.haskell.org/pipermail/haskell-cafe/2012-May/101338.html>
    <http://www.reddit.com/r/haskell/comments/u04vp/building_intuition_for_monads_without_mentioning/>


Greets,
Ertugrul

-- 
Key-ID: E5DD8D11 "Ertugrul Soeylemez <es at ertes.de>"
FPrint: BD28 3E3F BE63 BADD 4157  9134 D56A 37FA E5DD 8D11
Keysrv: hkp://subkeys.pgp.net/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: not available
URL: <http://www.haskell.org/pipermail/beginners/attachments/20120602/32a3072e/attachment.pgp>


More information about the Beginners mailing list