replaceAllWhere method

IList<T> replaceAllWhere(
  1. Predicate<T> test,
  2. T to
)

Finds all items that satisfy the provided test, and replace it with to.

Implementation

IList<T> replaceAllWhere(Predicate<T> test, T to) =>
    map((element) => test(element) ? to : element).toIList(config);