<< Back to previous view

[CLJ-459] RFE: modify description of "assoc" Created: 14/Oct/10  Updated: 03/Sep/13  Resolved: 03/Sep/13

Status: Closed
Project: Clojure
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Enhancement Priority: Major
Reporter: Anonymous Assignee: Unassigned
Resolution: Declined Votes: 0
Labels: None


 Description   

The documentation for "assoc" in clojure.core should probably
include

(assoc vector index val)
</code></pre>
and

<pre><code>(assoc vector index val & ivs)

in the usage line.



 Comments   
Comment by Assembla Importer [ 14/Oct/10 4:55 PM ]

Converted from http://www.assembla.com/spaces/clojure/tickets/459

Comment by Alex Miller [ 03/Sep/13 1:31 PM ]

assoc docstring talks about vectors. I don't think further changes are needed.

clojure.core/assoc
([map key val] [map key val & kvs])
  assoc[iate]. When applied to a map, returns a new map of the
    same (hashed/sorted) type, that contains the mapping of key(s) to
    val(s). When applied to a vector, returns a new vector that
    contains val at index. Note - index must be <= (count vector).
Generated at Fri Oct 24 13:50:15 CDT 2014 using JIRA 4.4#649-r158309.