On Mon, Mar 16, 2009 at 1:38 PM, Daniel Renfer <d...@kronkltd.net> wrote:
>
> One of the nice things about overloading first is you could always
> just tell people that the one argument version of first is like
> saying: (first identity coll) even though the actual implementation
> wouldn't need to bother with it.

I'm afaid not.

If a new 'first' were to act like (first (filter pred coll)), then the
new 'first' could currently be written:

  (first (filter identity '(nil 1 2)))  ==> 1

You can see where I'm headed:

  (first '(nil 1 2))  ==> nil

Thus for some coll, the new (first coll) would *not* be the same as
(first identity coll).

--Chouser

--~--~---------~--~----~------------~-------~--~----~
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
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