extract more than one item from a list by position
Feb 02 2023 | 8:13 pm
hi everyone, i have been banging my head against the wall about something i’m sure there’s an easy solution to! here it is: in a [coll] with 9 symbols per index, i’d like to keep only, say, every second, third, fifth and sixth of them, filtering out the rest. now, it seems to me that neither zl.nth/mth (which return only one element) nor zl.filter (for which i have to know the element in advance to make it the argument) do the trick. assuming there’s a way of consecutively filtering them out one after the other, i’m not excatly here how to do that. so how can i extract more than one item from a list by position? i’ve been working around this by using a [unpack s s s…] with 9 s and subsequently a [pack] with only four s but that’s looks somewhat amateurish to me. and i also get this error message "pack: missing arguments for message "symbol""—which i’m puzzled by. i’d be grateful if anyone could enlighten me! c.