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

ParameterTypeDescription
listlistthe source list
sizenumbermaximum chunk size, a positive integer

Examples

partition([1, 2, 3, 4, 5], 2)
[[1, 2], [3, 4], [5]] Try it →

Related functions

sublist · flatten

Defined by the OMG DMN 1.6 specification, chapter 10.3.4 (built-in functions).