Appends an element to the chunk
Returns the concatenation of this chunk with the specified chunk.
Returns a filtered, mapped subset of the elements of this chunk.
Returns a filtered, mapped subset of the elements of this chunk based on a .
Transforms all elements of the chunk for as long as the specified partial function is defined.
Drops the first n
elements of the chunk.
Drops all elements so long as the predicate returns true.
Determines whether a predicate is satisfied for at least one element of this chunk.
Returns a filtered subset of this chunk.
Filters this chunk by the specified effectful predicate, retaining all elements for which the predicate evaluates to true.
Returns the first element that satisfies the predicate.
Returns the concatenation of mapping every element into a new chunk using the specified function.
Flattens a chunk of chunks into a single chunk by concatenating all chunks.
Folds over the elements in this chunk from the left.
Effectfully folds over the elements in this chunk from the left.
Folds over the elements in this chunk from the right.
Folds over the elements in this chunk from the left.
Folds over the elements in this chunk from the left. Stops the fold early when the condition is not fulfilled.
Determines whether a predicate is satisfied for all elements of this chunk.
Returns the first element of this chunk if it exists.
Returns the first index for which the given predicate is satisfied after or at some given index.
Returns the first index for which the given predicate is satisfied.
Determines if the chunk is empty.
Returns the last element of this chunk if it exists.
Returns a chunk with the elements mapped by the specified function.
Statefully maps over the chunk, producing new elements of type B
.
Statefully and effectfully maps over the elements of this chunk to produce new elements.
Effectfully maps the elements of this chunk.
Effectfully maps the elements of this chunk in parallel.
Effectfully maps the elements of this chunk in parallel purely for the effects.
Effectfully maps the elements of this chunk purely for the effects.
Materializes a chunk into a chunk backed by an array.
Materializes a chunk into a chunk backed by an array. This method can improve the performance of bulk operations.
Generates a readable string representation of this chunk.
Generates a readable string representation of this chunk using the specified separator string.
Generates a readable string representation of this chunk using the specified start, separator, and end strings.
Determines if the chunk is not empty.
The number of elements in the chunk.
Returns two splits of this chunk at the specified index.
Takes the first n
elements of the chunk.
Takes all elements so long as the predicate returns true.
Converts the chunk into an array.
Zips this chunk with the specified chunk using the specified combiner.
Zips this chunk with the index of every element.
Zips this chunk with the index of every element, starting from the initial index value.
A
Chunk[A]
represents a chunk of values of typeA
. Chunks are designed are usually backed by arrays, but expose a purely functional, safe interface to the underlying elements, and they become lazy on operations that would be costly with arrays, such as repeated concatenation.