addAround method

List<V> addAround(
  1. Generator<V> generate
)

Returns new list with items generated around list

final list = ['😁','😒','😊'];
final newList = addAround(list, (index,previous,next) => '🍨');
print(newList);//['🍨','😁','🍨','😒','🍨','😊','🍨']

Implementation

List<V> addAround(fn.Generator<V> generate) => fn.addAround(this, generate);