apoc.coll.pairsMin
Function
apoc.coll.pairsMin(list [Any])
- returns lists of adjacent elements in the list ([1,2],[2,3]), skipping the final element.
Usage examples
The following creates a list of lists of adjacent elements in a list, skipping the last item:
RETURN apoc.coll.pairsMin([1,2,3,4,5]) AS output;
Output |
---|
[[1, 2], [2, 3], [3, 4], [4, 5]] |
Was this page helpful?