Functor => Pointed => Applicative => Monad
wren ng thornton
wren at freegeek.org
Tue Nov 30 06:22:53 CET 2010
On 11/29/10 10:30 AM, Stephen Tetley wrote:
> On 29 November 2010 13:28, John Smith<voldermort at hotmail.com> wrote:
>> fmap = map
>> This could be part of a legacy module, along with any other eliminated
>> duplicated functions. Historical cruft remains in Haskell far too long; is
>> there no desire for an occasional cleanup?
> Speaking personally, I'm quite happy to have both map and (functorial) fmap.
> Haskell's intention is to be a "state of the art _functional_
> language", so keeping the functional core doesn't seem unwarranted to
> me. There is the Charity language which was "categorical" first, and
> "functional" second if people really want a "crystal mountain".
Also, e.g., I'll often use "map" when my specific intention is to
restrict a type to lists, whereas I use "fmap" when I intend to be
general. Similarly for "concat" vs "join". While it is theoretically
valuable to see that one is just a specialization of the other, it is
practically valuable to make use of that specialization in order to have
our programs convey exactly what we mean (instead of what we /could/ mean).
While we really like extensionality, intensionality has its place too.
More information about the Libraries