Completely missing the categorical perspective here. Where are the functor laws? Additionally, we're missing the functors which aren't containers, like continuation-oriented functors, or which have monoidal summaries rather than mapping every point.
Elm was a terrible choice for an ML with which to illustrate functors. Something like OCaml or Haskell, where polymorphic abstractions are available, would have been a better choice. JS is right out. I don't know what this is supposed to teach, but the poor choice of language perverts it. (On the other hand, I wonder to what degree the poor choice of language is related to the idea that this post is actually bitten, ripped off from many other community posts, including ones with pictures and categorical ideas. [0][1][2])
It's too bad that HN doesn't ban spammers like Lobsters does. This post is yet another in a series of lightweight low-effort marketing snow, posted by a member of a spamming ring.
It's good to know what Functors and Applicatives are, and how they're different from Monads. This should be in the practical context that Monads do the daily heavy-lifting.
Elm was a terrible choice for an ML with which to illustrate functors. Something like OCaml or Haskell, where polymorphic abstractions are available, would have been a better choice. JS is right out. I don't know what this is supposed to teach, but the poor choice of language perverts it. (On the other hand, I wonder to what degree the poor choice of language is related to the idea that this post is actually bitten, ripped off from many other community posts, including ones with pictures and categorical ideas. [0][1][2])
It's too bad that HN doesn't ban spammers like Lobsters does. This post is yet another in a series of lightweight low-effort marketing snow, posted by a member of a spamming ring.
[0] http://adit.io/posts/2013-04-17-functors,_applicatives,_and_...
[1] https://toast.al/posts/code/2017-01-01-anatomy-of-maybe-part...
[2] https://dev.to/drbearhands/functors-monads-and-better-functi...