applyFor<T> method
Repeat the task
with T
as parameter for n
times
Implementation
T applyFor<T>(int n, T Function(T) task) {
T value = this as T;
n.repeatsFor(() => value = task(value));
return value;
}
Repeat the task
with T
as parameter for n
times
T applyFor<T>(int n, T Function(T) task) {
T value = this as T;
n.repeatsFor(() => value = task(value));
return value;
}