concatLists<T> function
Combine lists into one.
Implementation
List<T> concatLists<T>(Iterable<Iterable<T>> lists) {
if (lists.isEmpty) {
return [];
}
if (lists.length == 1) {
return lists.first.toList();
}
List<T> result = [];
for (Iterable<T> l in lists) {
result += l.toList();
}
return result;
}