[Haskell-cafe] Haskell function composition commutivity?

Viktor Dukhovni ietf-dane at dukhovni.org
Tue Apr 13 21:37:54 UTC 2021


On Tue, Apr 13, 2021 at 02:19:46PM -0500, Galaxy Being wrote:

> Your answers seem to originate outside of normal Haskell tutorials. Where
> can I start with this higher superset theory?

There's a reason why the tutorials don't cover this, the categorical
foundations of Haskell types are not beginner material.  It is perhaps
best to defer going down this rabbit hole until you're more comfortable
with the Haskell generally.

You could start with:

    https://bartoszmilewski.com/2014/10/28/category-theory-for-programmers-the-preface/
    https://bartoszmilewski.com/2015/04/07/natural-transformations/

For the Yoneda Lemma specifically, I'd recommend:

    http://blog.sigfpe.com/2006/11/yoneda-lemma.html

Parametricity is covered in "Theorems for free":

    https://www2.cs.sfu.ca/CourseCentral/831/burton/Notes/July14/free.pdf

but it is by no means elementary, though skimming it for the essential
facts and skipping the gory details is not too difficult.

You could also read "Categories for the Working Mathematician" by
Saunders Mac Lane.

-- 
    Viktor.


More information about the Haskell-Cafe mailing list