Partitioning functions
Reference documentation for Expressif functions in the array/partitioning scope.
| Name | Overview |
|---|---|
chunk | Splits an array into consecutive, non-overlapping chunks of at most the specified size, preserving a final partial chunk. It resembles a count-based tumbling window but, unlike general sliding or hopping windows, has no separate step and always keeps the final partial chunk. It does not group items by inactivity or time. Returns null when the input cannot be evaluated. |
chunk-around | Separates the element at a zero-based position from the elements before and after it, returning the three parts as a tuple. Returns null when the position is invalid or the input cannot be evaluated. |
chunk-on | Splits an array on a zero-based boundary and returns the elements before and from that position as a tuple. Positions beyond the end use the end boundary. Returns null when the position is negative or the input cannot be evaluated. |
chunk-while | Groups consecutive values while an operation over the complete current chunk and next candidate evaluates to true. Returns null when the operation does not produce a Boolean value or the input cannot be evaluated. |
distribute-condition | Distributes array values into matching and non-matching groups by evaluating a predicate once for each value. Returns null when the input cannot be evaluated. |
distribute-random-split | Randomly distributes array values among output arrays according to relative output weights. Returns null when the input, weights, or seed cannot be evaluated. |
distribute-round-robin | Distributes successive array values cyclically among a requested number of output arrays. Returns null when the count is not strictly positive or the input cannot be evaluated. |
distribute-weight | Distributes array values into two groups whose aggregate evaluated weights are approximately balanced. Returns null when the input or a weight cannot be evaluated. |