whereMoveToTheStart method

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

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

Implementation

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