assoc with uneven arguments

Showing 1-3 of 3 messages
assoc with uneven arguments Ambrose Bonnaire-Sergeant 8/29/12 11:20 AM
I think assoc should throw an error when applied with uneven arguments.

Currently, the "missing" value is just replaced with nil.

(assoc {} :a 1 :b)
;=> {:a 1, :b nil}

Thoughts?

Thanks,
Ambrose
Re: assoc with uneven arguments Chas Emerick 8/29/12 12:17 PM
Yes, please.  That's just wrong.

- Chas
Re: assoc with uneven arguments Andy Fingerhut 8/29/12 2:44 PM
http://dev.clojure.org/jira/browse/CLJ-1052

Vote for it and/or comment on it, if you are interested.

Andy