I could slap myself for not thinking of this sooner.
I have a list. I need to filter said list destructively (ie: modify the provided reference and not return a new list as a function result), and remove items which don’t meet criteria X.
My first dig at the code uses a for-loop and adds items to a second collection when the sub-item meets the criteria. Need to manage the incoming list, a new list and make sure i’ve overwritten the list reference at the end. Messy and as i discovered, error-prone
or….use a for-loop, and count backwards from Length to 0 and delete as i go.