Is there a nice (built-in) way to apply Replace-style rules to key-value pairs in an association? Something like
SomeFunction[<| "id" -> 3, "freq" -> 4 |>, "freq" -> #freq+1 &]
(* should produce <| "id" -> 3, "freq" -> 5 |> *)
This could also be used to add computed keys, like
SomeFunction[..., "density" -> #mass / #volume &]
This would be really useful when combining with Query
and Dataset
.