Re: Getting elements of a list
Re: Getting elements of a list
- Subject: Re: Getting elements of a list
- From: "Mark J. Reed" <email@hidden>
- Date: Wed, 16 Apr 2008 16:22:11 -0400
Ah, good ol' destructuring bind. Good thought.
On 4/16/08, Stan Cleveland <email@hidden> wrote:
> On 4/16/08 12:39 PM, "Stockly, Ed" wrote:
>
> > set myList to {{1, 2}, {3, 4}, {5, 6}}
> > set {a, b, c} to myList
> > set firstITems to {first item of a, first item of b, first item of c}
>
> Or here's another slight variation that I prefer:
>
> set myList to {{1, 2}, {3, 4}, {5, 6}}
> set {{a, b}, {c, d}, {e, f}} to myList
> set firstITems to {a, c, e}
>
> Stan C.
>
>
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> AppleScript-Users mailing list (email@hidden)
> Help/Unsubscribe/Update your Subscription:
> Archives: http://lists.apple.com/archives/applescript-users
>
> This email sent to email@hidden
>
--
Sent from Gmail for mobile | mobile.google.com
Mark J. Reed <email@hidden>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden