partition
FEEL built-in function · FEEL list functions
partition(list, size)
Not part of the DMN 1.6 standard: an extension supported by the engine behind this site. A model that uses it may not run on other DMN engines.
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 ↑
Edge cases and null handling
Part of FEEL list functions: how positions, nulls and single values behave across all of them, aggregating over lists of contexts, and every function side by side.
Related functions
Not defined by the OMG DMN 1.6 specification; documented here because the engine behind this site supports it.