CachedComputation<R, T, K> constructor

CachedComputation<R, T, K>(
  1. R function(
    1. T
    ), [
  2. K keyGenerator(
    1. T
    )?
])

Implementation

CachedComputation(this.function, [K Function(T)? keyGenerator])
    : keyGenerator = keyGenerator ?? ((T value) => deepCopy(value as K));