map_dict calls a function on each (key, value) pair and builds a dictionary from the transformed input
(see map in package purrr).
keep_dict and discard_dict keep and discard elements based on the return value of the
predicate function (see keep and discard in package purrr).
compact_dict returns a dictionary with all the NULL values removed.
map_dict(dict, .f, ...)
keep_dict(dict, .p, ...)
discard_dict(dict, .p, ...)
compact_dict(dict)map_dict, a dictionary with the same keys as dict, and values
given by the return value of .f. For keep_dict, discard_dict, and
compact_dict, a dictionary containing the entries that passed the filter.