transform all values in a list or dict
(any xs, function f) -> any
xs is a list, returns a list of all items in
xs mapped through
f accepts one argument, the list element is passed. If
f accepts two arguments, the list element and its index are passed.
xs is a dict, returns a dict of all entries mapped through
f accepts one argument, each entry’s value is passed. If
f accepts two arguments, each entry’s value and key are passed.
Throws an error if
xs is of any other type.
|list or dict||The list or dict to transform|
A function of the form