dropList<T> function

List<T> dropList<T>(
  1. int n,
  2. Iterable<T> l
)

Drop first n elements.

Implementation

List<T> dropList<T>(int n, Iterable<T> l) {
  if (l.isEmpty || n >= l.length) {
    return [];
  }
  if (n <= 0) {
    return l.toList();
  }
  return l.toList().sublist(n);
}