Split list in two with odd list, but cull middle item if even list: how to stream?


(unendlichkeitme) #1


i have a list of items that can be odd or even and i have to split that list in two lists, but if the list lengh is even, i need to cull that middle item.

for example, my list lenght is 7, i divided by 2 that is 3.5. of course with that number i cannot cull my middle item that is 3, so i substract 0.5 from that.

how do i stream filter like “if true odd number” go, “if false odd number”, do mathematical subtraction and use that one???

thank youuu


Like this?

Even Or Odd Dispatch_re.gh (7.7 KB)