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