Clojure

RFE: modify description of "assoc"

Details

  • Type: Enhancement Enhancement
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Declined
  • Affects Version/s: None
  • Fix Version/s: None
  • Component/s: None
  • 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.

Activity

Hide
Assembla Importer added a comment -
Show
Assembla Importer added a comment - Converted from http://www.assembla.com/spaces/clojure/tickets/459
Alex Miller made changes -
Field Original Value New Value
Fix Version/s Backlog [ 10035 ]
Alex Miller made changes -
Priority Major [ 3 ]
Hide
Alex Miller added a comment -

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).
Show
Alex Miller added a comment - 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).
Alex Miller made changes -
Resolution Declined [ 2 ]
Status Open [ 1 ] Closed [ 6 ]

People

  • Assignee:
    Unassigned
    Reporter:
    Anonymous
Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: