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

damodar kulkarni kdamodar2000 at gmail.com
Sun Jun 3 01:29:19 CEST 2012


Hello,
I find this whole discussion very much helpful.

Ertugrul said:

Monads, while being less general, are more expressive.
>

This statement is rather counter-intuitive for me.

Here is another statement regarding generality and expressiveness:
If we consider DFA and PDA, for instance, PDA is more general and more
expressive than DFA.

Can we say that because PDA is more general than DFA, PDA is more
expressive than DFA.
As per the normal understanding the more general a machine becomes, the
more expressive it is.

So, in what exact sense are you using the terms "general" and "expressive"
w.r.t. Monads and Arrows?

Another thing:

   - Is it because Monads are more expressive they are more difficult to
   compose (as is the case of the DFA automaton) ?
   - Is it because Arrows are less expressive they are easier to compose ?

But then, a more general thing will make it more difficult for us to make
it composible in a yet larger scheme of things.

Am I missing something here?

Thanks and regards,
-Damodar Kulkarni


On Sat, Jun 2, 2012 at 5:32 PM, Ertugrul Söylemez <es at ertes.de> wrote:

> 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/
>
> _______________________________________________
> Beginners mailing list
> Beginners at haskell.org
> http://www.haskell.org/mailman/listinfo/beginners
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/beginners/attachments/20120603/fe85283f/attachment.htm>


More information about the Beginners mailing list