I'm trying to dump all lists in a coll that start with a certain number. I made a patch that tests the first number in the list and opens a gate if it matches:
Unfortunately, it doesn't come out right. I suspect it has to do with timing issues, but putting a defer or delay on the data before reaching the gate hasn't helped. Can somebody please help me sort out the timing of this simple sieve?
Thanks MIB, that's exactly what I was trying to do! Max's timing still confuses me a bit sometimes.
It seems that my main problem was I needed to use trigger to make sure the calculation was done first, and my other problem was I needed to store the index so it wouldn't get lost before the gate opened.
I think your timing was alright (unpack was to the right of gate), the trigger just makes it explicit. but you did indeed loose the index due to ordering issues.
one way to check your ordering would be to add breakpoints and activate the debugger. that should clarify things. it's worth the exercise to add breakpoints to both patches and see where they do different things...