Re: Sifting a list sans loop
Re: Sifting a list sans loop
- Subject: Re: Sifting a list sans loop
- From: Paul Berkowitz <email@hidden>
- Date: Sat, 26 Jan 2002 19:33:11 -0800
On 1/26/02 6:43 PM, "ehsan saffari" <email@hidden> wrote:
>
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
I'm in OS X and can't check, but I seem to recall that Akua's 'edit list'
doesn't work. If it does, its parameter
[with extraction of list of type class] -- A list of types to extract
from the list - e.g. {integer} or {integer, string}
should do just what you want.
>
>
Would be really cool if one could apply a "whose" clause to lists!
Wouldn't it just? No. 1 feature request from all scripters for the past 10
years, I should think.
--
Paul Berkowitz