Sifting a list sans loop
Sifting a list sans loop
- Subject: Sifting a list sans loop
- From: ehsan saffari <email@hidden>
- Date: Sat, 26 Jan 2002 20:43:13 -0600
I have many lists of 2000-5000 items.
In each list each item is either a list or a string.
I need to discard the lists and keep the strings for further processing.
Is there a method (osax included) that would allow me to discard the list
items without using a loop:
repeat
if class of x is not list then ...
keep it
else
dump it
end if
end repeat
Would be really cool if one could apply a "whose" clause to lists!
thanks for any hints
cheers
ehsan