pullAt function

List pullAt(
  1. List array,
  2. List indexes
)

Removes elements from array corresponding to indexes and returns an array of removed elements

Implementation

List pullAt(List array, List indexes) {
  var result = [];
  for (var index in indexes) {
    result.add(array.removeAt(index));
  }
  return result;
}