apoc.coll.pairWithOffset
Function APOC Core
apoc.coll.pairWithOffset(values, offset) - returns a list of pairs defined by the offset
Usage Examples
The following returns a list of pairs defined by the offset:
RETURN apoc.coll.pairWithOffset([1,2,3,4], 2) AS value| value | 
|---|
| [[1,3],[2,4],[3,null],[4,null]] | 
It works also as procedure:
CALL apoc.coll.pairWithOffset([1,2,3,4], 2)
| value | 
|---|
| [1,3] | 
| [2,4] | 
| [3,null] | 
| [4,null] |