apoc.coll.combinationsFunction
| Syntax | 
 | ||
| Description | Returns a collection of all combinations of  | ||
| Arguments | Name | Type | Description | 
| 
 | 
 | The list to return the combinations from. | |
| 
 | 
 | The minimum selection size of the combination. | |
| 
 | 
 | The maximum selection size of the combination. The default is:  | |
| Returns | 
 | ||
Usage examples
The following returns a collection of all combinations of LIST<ANY> elements of selection size between 3 and 4 elements:
RETURN apoc.coll.combinations([1,3,5,7,9], 3, 4) AS output;| Output | 
|---|
| [[1, 3, 5], [1, 3, 7], [1, 5, 7], [3, 5, 7], [1, 3, 9], [1, 5, 9], [3, 5, 9], [1, 7, 9], [3, 7, 9], [5, 7, 9], [1, 3, 5, 7], [1, 3, 5, 9], [1, 3, 7, 9], [1, 5, 7, 9], [3, 5, 7, 9]] |