You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Would be nice to have some sort of syntax for "meandering" sequences.
Syntax could be something like:
1..5~3 # Meander by 3 but keep first and last, for example: 1 3 4 2 5
1..5?3 # Meander by 3 (similar to suffle but using 3 random swaps), for example: 3 1 2 5 4
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Would be nice to have some sort of syntax for "meandering" sequences.
Syntax could be something like:
1..5~3 # Meander by 3 but keep first and last, for example: 1 3 4 2 5
1..5?3 # Meander by 3 (similar to suffle but using 3 random swaps), for example: 3 1 2 5 4
Meandering could be implemented as method ringing or on basis of cycle notation or meandric permutation.
To have more control over "meandering" it could also be implemented as list transformation using syntax similar to cycle notation:
(1 (2 3) (4 5 6) 7)<permutation>(2) # Would only permutate lists (2 3) (4 5 6) by 2
Beta Was this translation helpful? Give feedback.
All reactions