Break a big list into smaller chunks and map each chunk
Filter out elements that match the predicate, applying the supplied function to each filtered out element, and returning the remaining elements.
Applies f
to each item in the collection until the first Some[U] is found and return it, or None otherwise
Applies f
to each item in the collection and returns a List
Applies f
to each item in the collection and returns a Map, discarding
duplicates.
Creates a map from a sequence, mapping each element in the sequence by a given Option[key].
Creates a map from a sequence, mapping each element in the sequence by a given Option[key]. If keys are duplicated or None, values will be discarded.
Applies f
to each item in the collection and returns a Set
Applies f
to each item in the collection and returns a Vector
Groups the given sequence by a function that transforms the sequence into keys and values.
Groups the given sequence by a function that transforms the sequence into keys and values.
For example. Seq(1 -> "a", 2 -> "a", "1" -> "b").groupByKeyValue(x => x)
will return
Map(1 -> List(a, b), 2 -> List(a))
Convenience wrapper for Iterable.sliding(2) that gives you #exactlywhatyouwant: tuples instead of Lists
Applies f
to each item in the collection and returns a List
Like toMap
, but accumulates the values into a Seq, rather than
discarding the values of duplicated keys.
Applies f
to each item in the collection and returns a Map, discarding
duplicates.
Creates a map from a sequence, mapping each element in the sequence by a given key.
Creates a map from a sequence, mapping each element in the sequence by a given key. If keys are duplicated, values will be discarded.
Applies f
to each item in the collection and returns a mutable Map,
discarding duplicates.
Applies f
to each item in the collection and returns a Set
Applies f
to each item in the collection and returns a Vector
Returns the top N elements in the Iterable.
Returns the top N elements in the Iterable. They'll come back in no particular order.
Returns the top N elements in the Iterable.
Returns the top N elements in the Iterable. They'll come back sorted :)
Returns the top N elements in the Iterable.
Returns the top N elements in the Iterable. They'll come back in no particular order.
Like zip
, but continues even after the second iterable has been exhausted.
Like zip
, but doesn't stop until *both* iterables are exhausted.
Like zip
, but doesn't stop until *both* iterables are exhausted. The length
of the result will be max(firstList.size, secondList.size).
Like zip
, but continues even after the first iterable has been exhausted.