On Thu, Dec 9, 2010 at 8:43 PM, Steven E. Harris <s...@panix.com> wrote:
> Ken Wesson <kwess...@gmail.com> writes:
>
>> and to encapsulate as a function:
>>
>> (defn fmap [f m]
>>   (into {}
>>     (for [[k v] m]
>>       [k (f v)])))
>
> Here, "fmap" is a poor choice of name, if it's meant to be a reference
> to Haskell's function of the same name. It's not obvious to me that
> mapping a function over a map should just apply the function to the
> values. Yes, applying the function to the keys instead could yield
> duplicates, but just because one choice of behavior isn't promising
> doesn't make the other choice obviously valid.
>
> If you called your function, say, "fmap-values" I would not have
> complained.

Please direct all complaints regarding calling it fmap to Sunil. He
was the first to suggest that name in this thread, not I.
(<aanlkti=-m4c2wwnhjta=jqfsfpzhnofed-hfzs-yb...@mail.gmail.com>)

I merely copied him.

:)

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Reply via email to