map<K, V> static method

List<V> Function(List<K> list) map<K, V>(
  1. V fn(
    1. K elem
    )
)

Returns a new list where each element of list is transformed by fn. If V is nullable, and fn returns null, null will be added to the list. Otherwise, use return null to skip these elements. Call like FP.map<K,V>(fn)(list)

Implementation

static List<V> Function(List<K> list) map<K, V>(V Function(K elem) fn) =>
    (final List<K> list) => _map<K, V>(fn, [])(list);