Repeatedly fetching a value, calculating a replacement, and setting it back makes small data changes feel surprisingly tedious. An update function packages that pattern: give it structured data, a path, and a transformation; it returns a new version with the transformed value. section 14.1
Design the abstraction from its intended use:
- Rewrite the business operation as if update already existed. section 14.1
- Pass the transformation as an argument so update remains generic rather than encoding one business rule. section 14.1
