Returns a new Map where the values are used as keys in a map.
Map<T, R> asKeys<R>(R Function(T) f) => Map.fromEntries(map((e) => MapEntry(e, f(e))));