Fixed
Details
Assignee
UnassignedUnassignedReporter
Arne BrasseurArne BrasseurLabels
Approval
OkPatch
CodePriority
MinorFix versions
Details
Details
Assignee
Unassigned
UnassignedReporter
Arne Brasseur
Arne BrasseurLabels
Approval
Ok
Patch
Code
Priority
Fix versions
Created October 5, 2017 at 6:47 PM
Updated November 23, 2021 at 8:43 PM
Resolved November 23, 2021 at 6:29 PM
Problem
The
get
function does not document the behavior when given aString
orArray
instance.Context
get's implementation checks in order for
ILookup
nil
Map
IPersistentSet
String or Java array
The docstring for get currently reads
Returns the value mapped to key, not-found or nil if key not present.
That this works on maps and associative data can reasonably be inferred if one knows Clojure's data model. That it works on sets, Strings, and arrays is less obvious, and would be helpful to mention.
Proposed: New docstring for get:
Returns the value mapped to key, not-found or nil if key not present in associative collection, set, string, or array.
Patch: clj-2249-5.patch
Screened by: Alex Miller