withoutLast<T> function

List<T> withoutLast<T>(
  1. List<T> list
)

Implementation

List<T> withoutLast<T>(List<T> list) {
  var copy = [...list];
  copy.removeLast();
  return copy;
}