@NonNull static fun <A : Any!, B : Any!> map(@NonNull list: MutableList<A>, @NonNull mapper: (A) -> B): MutableList<B>
For the given List of values runs the given function on each list value and stores the result in another list.
list
- MutableList<A>: list of values that are going to be mapped
mapper
- (A) -> B: function used for mapping
Return
MutableList<B>: list of mapped values