On Tue, Mar 8, 2011 at 2:28 PM, Alan <a...@malloys.org> wrote: > On Mar 8, 10:27 am, Ken Wesson <kwess...@gmail.com> wrote: >> On Tue, Mar 8, 2011 at 10:42 AM, Chris Perkins <chrisperkin...@gmail.com> >> wrote: >> > You'll probably want to add checks for special cases, like an empty or >> > one-element sequence, too. >> >> Better yet, clojure.core should amend = so that (=) and (= x) return >> true instead of throwing an arity exception. That would make the >> behavior consistent with + and * which behave appropriately with one >> or zero arguments, and it would handle your special cases in this >> instance. > > Only the zero-arity case needs to be amended: > > user=> (= 1) > true > user=> (=) > java.lang.IllegalArgumentException: Wrong number of args (0) passed > to: core$-EQ- (NO_SOURCE_FILE:0)
Eh. That's even stranger. Why would they include one special case but not the other?! -- 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