A function to update multiple parts of a structure.given a function that gives the locations of those parts.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
|"Takes a structure, a function that returns a list of paths (lists of keys) and a|
|function to apply at those paths within the structure.|
|For any paths that don't already exist in m, then f will be called with nil|
|and that path in the structure will be created with the result."|
|[m path-generation-fn f]|
|(reduce (fn [s v] (update-in s v f))|