Trouble with outputting selected items from the list
Hi. I am using repeating patterns in the format “1 0 1 0 0” where “1” means we are grabbing an item from the list at that moment.
Example:
A B C D E F G H I J - Main list.
1 0 0 1, 1 0 0 1, 1 0 0 1 - Repeating pattern.
It should come out: A D E H I
I am facing a problem with the output. When I first run the patch - the output is correct, but when I run it again the output shifts a bit, instead of the first item in the list I get the last one.
I can't figure out what the problem is.


My patch:
Edit #1: I think the problem is that the list is not divided by the number of elements in the pattern (4), for example if the list has 5 elements, then with the pattern "1 0 0 1" the last one will fire the trigger, after which [ buddy] will expect a list (2nd element), this (seems) to start from the last (5th) character. In any case, I still haven't found a solution to the problem.
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
use zl.iter 4, and it will do what you want
