@NonNull static fun <A : Any!> replaceAll(@NonNull elements: MutableList<A>, @NonNull predicate: Predicate<A>, @NonNull replacement: A): MutableList<A>
Replaces elements that satisfies the given predicate, in the given list, with given replacement. Values that do not satisfy the predicate are left unchanged.
elements - MutableList<A>: List of values.
predicate - Predicate<A>: Predicate that needs to be satisfied.
replacement - A: Replacement value.
Return
MutableList<A>: A new list, with all elements satisfying the predicate replaced by the new element.