Differentiates the collection by calculating the pairwise difference of the elements.
Differentiates the collection by calculating the pairwise difference of the elements.
the result collection type
the numerical view of the elements
the result type builder factory
a new collection having a size one less than the input collection. the first element will be the different of the second and first element of the input sequence, etc.
Clumps the collection into groups based on a predicate which determines if successive elements belong to the same group.
Clumps the collection into groups based on a predicate which determines if successive elements belong to the same group.
For example: {{ val x = List("a", "a", "b", "a", "b", "b") x.groupWith(_ == _).to[Vector] }}
produces Vector(List("a", "a"), List("b"), List("a"), List("b", "b"))
.
the group type
a function which is evaluated with successive pairs of the input collection. As long
as the predicate holds (the function returns true
), elements are lumped together.
When the predicate becomes false
, a new group is started.
a builder factory for the group type
an iterator over the groups.
Integrates the collection by aggregating the elements step by step.
Integrates the collection by aggregating the elements step by step.
the result collection type
the numerical view of the elements
the result type builder factory
a new collection having the same size as the input collection. the first element will be identical to the first element in the input sequence, the second element will be the sum of the first and second element of the input sequence, etc.
Enrichment methods for sequential collections.