mapExceptLast<T> function
Implementation
List<T> mapExceptLast<T>(Iterable<T>? list, T map(T t)) {
final items = list?.toList(growable: false) ?? [];
for (var i = 0; i < items.length; ++i) {
if (i < list!.length - 1) {
items[i] = map(items[i]);
}
}
return items;
}