The update function: like update-in, for first level

Description

update-in is useful for updating nested structures. Very often we just want to update one level, so an update function optimised for this use case is useful.

It operates identically to update-in with a key path of length one so these are the same:

Patch: CLJ-1251.patch

Screened by: Alex Miller

Environment

None

Attachments

2

Activity

Ambrose Bonnaire-Sergeant May 23, 2014 at 6:16 PM

Add multiple arities + tests (CLJ-1251.patch)

Ambrose Bonnaire-Sergeant May 23, 2014 at 5:40 PM

Yes will do now.

Alex Miller May 23, 2014 at 5:25 PM

Ambrose, can you (or anyone else really) update the patch to unroll small arities?

Alex Miller May 22, 2014 at 2:14 PM

I think that's probably worth doing - who can update the patch with multiple arities?

gfredericks May 17, 2014 at 2:45 AM

Is it worth unrolling several arities for the sake of premature optimization? e.g., https://github.com/Prismatic/plumbing/blob/master/src/plumbing/core.clj#L33-41

Completed

Details

Assignee

Reporter

Approval

Patch

Priority

Affects versions

Fix versions

Created September 3, 2013 at 3:01 PM
Updated August 29, 2014 at 6:00 PM
Resolved August 29, 2014 at 6:00 PM