[Haskell-beginners] How to solve this using State Monad?
kdamodar2000 at gmail.com
Sun Jun 3 01:29:19 CEST 2012
I find this whole discussion very much helpful.
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?
- 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,
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:
> 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
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Beginners