groupList<T> function

List<List<T>> groupList<T>(
  1. Iterable<T> it
)

Group consecutive equal elements together.

Implementation

List<List<T>> groupList<T>(Iterable<T> it) {
  List<T> l = List.from(it);
  return groupByList((a, b) => deepEquals(a, b), l);
}