Uploaded image for project: 'Clojure'
  1. CLJ-1052

assoc should throw exception if missing val for last key

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Completed
    • Affects versions: Release 1.4, Release 1.3, Release 1.2
    • Fix versions: Release 1.5
    • Labels:
      None
    • Approval:
      Ok
    • Patch:
      Code and Test

      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}

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              Andy Fingerhut
            • Votes:
              5 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: