[Haskell-cafe] AMP - how do you motivate this in teaching?

Martin Heuschober epsilonhalbe at gmail.com
Fri Nov 20 09:21:07 UTC 2015


I just recently had a presentation at my local usergroup
(Lambdaheads/Vienna) where I introduced the problem of `null` values and
the functional solution of using functor, applicative and monad to solve
this.

The slides are available -
https://github.com/epsilonhalbe/Talks/tree/master/20151021-LH-Func - if you
have comments on them, I'd be glad to hear, during the meetup we had quite
a discussion about it, but in the end I think everyone agreed that those
abstractions are handy and quite natural in their origination.

the tldr of it is:
that in functional languages, one major point of doing things is function
composition and to introduce new functions (in this case operators) to
solve the problem when domains do not match properly, i.e. to put the
complicated part in the composition and not bother the programmer with it.

I think the "excuse" for `return` existing is historical which I think is
no bad thing to say when teaching, because it makes students aware that
everything is being improved over time and that they might be the ones
helping.

Cheers Martin

2015-11-20 9:22 GMT+01:00 Joachim Breitner <mail at joachim-breitner.de>:

> Hi,
>
> thanks for your mail! I am circulating it to my Haskell teaching
> colleagues, who are facing the same challenges as Johannes.
>
> Am Donnerstag, den 19.11.2015, 21:00 -0430 schrieb Manuel Gómez:
> > The three classes are distinguished by their expanding
> > APIs, and it’s helpful, if you have enough time for the lesson, to
> > show types that are Functor but not Applicative (e.g. «(,) e»).
>
> There is the instance
>     Monoid a => Applicative ((,) a)
> Do you touch upon that, or pretend it is not there?
>
> Greetings,
> Joachim
>
> --
> Joachim “nomeata” Breitner
>   mail at joachim-breitner.dehttp://www.joachim-breitner.de/
>   Jabber: nomeata at joachim-breitner.de  • GPG-Key: 0xF0FBF51F
>   Debian Developer: nomeata at debian.org
>
>
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/haskell-cafe/attachments/20151120/f233ebe6/attachment.html>


More information about the Haskell-Cafe mailing list