We're updating the issue view to help you get more done. 

assoc should throw exception if missing val for last key

Description

https://groups.google.com/forum/?fromgroups=#!topic/clojure/k2R4OdPUCzg

Suggested by Ambrose Bonnaire-Sergeant:

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}

Environment

None

Status

Assignee

Unassigned

Reporter

Andy Fingerhut

Labels

None

Approval

Ok

Patch

Code and Test

Fix versions

Affects versions

Release 1.4
Release 1.2
Release 1.3

Priority

Minor