list<T, F extends Fr<T>> static method

CachedFr<T, int, List<T>, F> list<T, F extends Fr<T>>({
  1. required Fr<List<T>> fv,
  2. required F wrap(
    1. Fr<T> item
    ),
  3. T? defaultValue,
  4. 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);
}