aggregateBy
internal inline fun <T, reified V : R, R> Aggregator<V & Any, R>.aggregateBy(values: Sequence<T>, crossinline selector: (T) -> V): Result<T>
Selects the best matching value in the sequence using the provided Aggregator by the provided selector.
Type Parameters
V
is used to infer whether there are nulls in the values fed to the aggregator!
internal inline fun <T, reified V : R, R> Aggregator<V & Any, R>.aggregateBy(values: Iterable<T>, crossinline selector: (T) -> V): Result<T>
Selects the best matching value in the iterable using the provided Aggregator by the provided selector.
Faster implementation than for sequences.
Type Parameters
V
is used to infer whether there are nulls in the values fed to the aggregator!
internal inline fun <T, reified V : R, R> Aggregator<V & Any, R>.aggregateBy(column: DataColumn<T>, crossinline selector: (T) -> V): Result<T>
Selects the best matching value in the column using the provided Aggregator by the provided selector.
Type Parameters
V
is used to infer whether there are nulls in the values fed to the aggregator!