Skip to content

Commit

Permalink
feat(feel): Add new built-in function (#4713)
Browse files Browse the repository at this point in the history
Add new built-in function of the FEEL engine to the FEEL documentation.
  • Loading branch information
lzgabel authored Dec 9, 2024
1 parent 7eb9118 commit 0691fdd
Showing 1 changed file with 27 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -621,3 +621,30 @@ is empty([])
is empty([1,2,3])
// false
```

## partition(list, size)

<MarkerCamundaExtension></MarkerCamundaExtension>

Returns consecutive sublists of a list, each of the same size (the final list may be smaller).

If `size` is less than `0`, it returns `null`.

**Function signature**

```feel
partition(list: list, size: number): list
```

**Examples**

```feel
partition([1,2,3,4,5], 2)
// [[1,2], [3,4], [5]]
partition([], 2)
// []
partition([1,2], 0)
// null
```

0 comments on commit 0691fdd

Please sign in to comment.