List<T> chopList<T>(Iterable<T> items) { final list = [...items]; if (list.isEmpty) return list; return list.sublist(0, list.length - 1); }