mostly-adequate-guide icon indicating copy to clipboard operation
mostly-adequate-guide copied to clipboard

Chapter 8: confusion between types and values in Functor explanation

Open ivan-kleshnin opened this issue 9 years ago • 2 comments

https://drboolean.gitbooks.io/mostly-adequate-guide/content/ch8.html

I think there is some problem.

  1. This paragraph goes first:

For instance, Maybe maps our category of types and functions to a category where each object may not exist and each morphism has a null check

  1. Then this picture is presented

functormap

  1. Accompanied by this example showing something quite different from the words above.

functormapmaybe

In those two pictures a and b are not types. They are values. I'm not sure if it's correct to call presented mapping a Functor but even if so we need to add some notes IMO because it goes against the quoted paragraph.

ivan-kleshnin avatar Feb 26 '16 20:02 ivan-kleshnin

I think the confusion here is "category of types and functions", which I meant to be just our normal category of JS that has JS values and JS functions. It is certainly the functor graph, but my wording is a little off

DrBoolean avatar Mar 25 '16 15:03 DrBoolean

Than a simple rewording should suffice. I wouldn't even bother with issue if I weren't stumbled by similar case some time ago.

ivan-kleshnin avatar Mar 25 '16 17:03 ivan-kleshnin