Menu

#58 Sublist operators

0.6.4
open
aditsu
None
2015-05-02
2015-05-02
Optimizer
No

Create 2 sublist operators:

[1 2 3 4 5 6] e* -> Gives all possible sublists of the array

[1 2 3 4 5 6] 2 e% -> Gives all possible sublists of length 2 % array_length of the array i.e. [[1 2] [1 3] [1 4] [1 5] [1 6] [2 3] [2 4] [2 5] [2 6] [3 4] [3 5] [3 6] [4 5] [4 6] [5 6]]

Feel free to use other operators than e* or e%

Discussion


Log in to post a comment.

MongoDB Logo MongoDB