whereMoveToTheEnd method

IList<T> whereMoveToTheEnd(
  1. bool test(
    1. T item
    )
)

Moves all items that satisfy the provided test to the end of the list. Keeps the relative order of the moved items.

Implementation

IList<T> whereMoveToTheEnd(bool Function(T item) test) {
  IListOf2<IList<T>> lists = divideIn2(test);
  return lists.last + lists.first;
}