phldavies
10/22/2024, 2:10 PMpublic fun <K, A, B> Map<K, A>.mapNotNull(transform: (Map.Entry<K, A>) -> B?): Map<K, B> to mapValuesNotNull to avoid collision with stdlib public inline fun <K, V, R : Any> Map<out K, V>.mapNotNull(transform: (Map.Entry<K, V>) -> R?): List<R>?Alejandro Serrano.Mena
10/23/2024, 7:40 AMphldavies
10/23/2024, 8:46 AMAlejandro Serrano.Mena
10/23/2024, 8:58 AMphldavies
10/23/2024, 9:27 AMinline while we're there? I'll include any others with similar convention (i.e. flatMap -> flatMapValues )
not sure about mapOrAccumulate though as stdlib Map<K, V>.map returns List<R> but mapOrAccumulate does the equivalent of Map<K, V>.mapValues instead. do we want/need mapOrAccumulate -> Either<Error, List<R>> and mapValuesOrAccumulate -> Either<Error, Map<K, B>>?Alejandro Serrano.Mena
10/23/2024, 9:28 AMinline, let's mark Arrow's as inline toophldavies
10/23/2024, 9:30 AMmapOrAccumulate -> List varieties to match stdlib in a future release?Alejandro Serrano.Mena
10/23/2024, 9:33 AMphldavies
10/23/2024, 10:40 AM