map<T, K, F extends Fr<T>> static method
CachedFr<T, K, Map<K, T>, F>
map<
T, K, F extends Fr<T>>({ - required Fr<Map<K, T>> fv,
- required F wrap(
- Fr<T> item
),
- T? defaultValue,
- DspReg? disposers,
})
Implementation
static CachedFr<T, K, Map<K, T>, F> map<T, K, F extends Fr<T>>({
required Fr<Map<K, T>> fv,
required F Function(Fr<T> item) wrap,
T? defaultValue,
DspReg? disposers,
}) {
final cache = Cache<K, F>((index) {
final item = fv.itemFrHot(
index,
defaultValue: defaultValue,
disposers: disposers,
);
return wrap(item);
});
return CachedFr(fv, cache.get);
}