Untitled

Anonymous
plain_text
11/11/2023 7:05 PM
196 B
14
Indexable
fun <T, U> mapUsingFold(list: List<T>, mapF: (T) -> U): List<U> { 
    return list.fold(mutableListOf<U>()) { acc, t -> acc.add(mapF(t)); acc }
} 
Editor is loading...