insertAtEnds function

List<String> insertAtEnds(
  1. List<String> ls,
  2. String begin,
  3. String end
)

Implementation

List<String> insertAtEnds(List<String> ls, String begin, String end) {
  ls.insert(0, begin);
  ls.add(end);
  return ls;
}