assoc with uneven arguments

67 views
Skip to first unread message

Ambrose Bonnaire-Sergeant

unread,
Aug 29, 2012, 2:20:19 PM8/29/12
to clojure
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

Chas Emerick

unread,
Aug 29, 2012, 3:17:16 PM8/29/12
to clo...@googlegroups.com
Yes, please. That's just wrong.

- Chas

Andy Fingerhut

unread,
Aug 29, 2012, 5:43:59 PM8/29/12
to clo...@googlegroups.com
http://dev.clojure.org/jira/browse/CLJ-1052

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

Andy
Reply all
Reply to author
Forward
0 new messages