joinSeparator method
Implementation
List<T> joinSeparator(T separator) {
List<T> result = [];
for (int i = 0; i < length; i++) {
if (i > 0) {
result.add(separator);
}
result.add(this[i]);
}
return result;
}
List<T> joinSeparator(T separator) {
List<T> result = [];
for (int i = 0; i < length; i++) {
if (i > 0) {
result.add(separator);
}
result.add(this[i]);
}
return result;
}