prepend<T> static method

List<T> prepend<T>(
  1. Iterable<T> list,
  2. T value
)

Returns a new list with value inserted at the front.

Implementation

static List<T> prepend<T>(Iterable<T> list, T value) => [value, ...list];