Every story and comment from the Hacker News API, in a layout borrowed from 2001.
A comment on A Pythonista's Review of Haskell. Parent comment
> Functors: uniform action over a parameterized type, generalizing the map function on lists.
> Is it really more complicated than "apply a function to every object in a list"?
It is defined for more data structures then just a lists. Other than that, not at all.
As far as I can tell, the only reason Haskell has both map and fmap is because "map" came first. When applied to a list, fmap and map are identical.
There are no comments on this comment yet.
> Functors: uniform action over a parameterized type, generalizing the map function on lists.
> Is it really more complicated than "apply a function to every object in a list"?
It is defined for more data structures then just a lists. Other than that, not at all.
As far as I can tell, the only reason Haskell has both map and fmap is because "map" came first. When applied to a list, fmap and map are identical.