Closed
Description
replaceIf
and setAt
are really two variants of the same kind of operation. They both replace some element(s) with a given value. Perhaps their naming should reflect this similarity. (Similar to how we have updateIf
and updateAt
.) Some questions to consider.
- Are there any advantages provided by keeping the current naming?
- If not, which name describes the operation better? (It may or may not be relevant to the discussion to note that
Array
uses the nameset
for a similar operation.) - Perhaps out of the scope of this issue but also related, do we even need
setAt
andreplaceIf
when they are essentially equivalent to callingupdateAt
andupdateIf
with an update function ofalways x
.
Metadata
Metadata
Assignees
Labels
No labels