• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Sifting a list sans loop
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >Sifting a list sans loop (From: ehsan saffari <email@hidden>)

  • Prev by Date: Re: Problems with speed & issues with coercion in OS 9.2.2
  • Next by Date: Re: Problems with speed & issues with coercion in OS 9.2.2
  • Previous by thread: Sifting a list sans loop
  • Next by thread: Re: Sifting a list sans loop
  • Index(es):
    • Date
    • Thread