reduceToData
inline fun <T : Any, R : Any> Collection<Data<T>>.reduceToData(coroutineContext: CoroutineContext = EmptyCoroutineContext, meta: Meta = Meta.EMPTY, crossinline block: suspend (Collection<T>) -> R): Data<R>
Content copied to clipboard
Lazily reduce a collection of Data to a single data.
fun <K, T : Any, R : Any> Map<K, Data<T>>.reduceToData(outputType: KType, coroutineContext: CoroutineContext = EmptyCoroutineContext, meta: Meta = Meta.EMPTY, block: suspend (Map<K, T>) -> R): Data<R>
Content copied to clipboard
Lazily reduce a Map of Data with any static key.
Parameters
K
type of the map key
T
type of the input goal
R
type of the result goal