Use Algebird Aggregator to do the reduction
Use Algebird Aggregator to do the reduction
Selects all elements except first n ones.
Selects all elements except first n ones.
Drops longest prefix of elements that satisfy the given predicate.
Drops longest prefix of elements that satisfy the given predicate.
Operate on a Stream[T] of all the values for each key at one time.
Operate on a Stream[T] of all the values for each key at one time. Avoid accumulating the whole list in memory if you can. Prefer reduce.
This is a special case of mapValueStream, but can be optimized because it doesn't need all the values for a given key at once.
This is a special case of mapValueStream, but can be optimized because it doesn't need all the values for a given key at once. An unoptimized implementation is: mapValueStream { _.map { fn } } but for Grouped we can avoid resorting to mapValueStream
reduce with fn which must be associative and commutative.
reduce with fn which must be associative and commutative. Like the above this can be optimized in some Grouped cases. If you don't have a commutative operator, use reduceLeft
Selects first n elements.
Selects first n elements.
Takes longest prefix of elements that satisfy the given predicate.
Takes longest prefix of elements that satisfy the given predicate.