map<R> method

KtList<R> map<R>(
  1. R transform(
    1. T
    )
)

Returns a list containing the results of applying the given transform function to each element in the original collection.

Implementation

KtList<R> map<R>(R Function(T) transform) {
  final KtMutableList<R> list = mutableListOf<R>();
  final mapped = mapTo(list, transform);
  // TODO ping dort-lang/sdk team to check type bug
  // When in single line: type "DartMutableList<String>' is not a subtype of type 'Null"
  return mapped;
}