partition
FEEL built-in function · List functions
partition(list, size)
Splits the list into consecutive chunks of the given size; the last chunk may be shorter.
Parameters
| Parameter | Type | Description |
|---|---|---|
| list | list | the source list |
| size | number | maximum chunk size, a positive integer |
Examples
partition([1, 2, 3, 4, 5], 2)
[[1, 2], [3, 4], [5]]
Try it →
Related functions
Defined by the OMG DMN 1.6 specification, chapter 10.3.4 (built-in functions).