Re: I want to convert a list of integers to their negative self
Re: I want to convert a list of integers to their negative self
- Subject: Re: I want to convert a list of integers to their negative self
- From: email@hidden
- Date: Wed, 28 Feb 2001 23:38:13 EST
In a message dated 2/28/01 9:28:54 PM,
email@hidden writes:
>
set a to {"1", "3", "7"}
>
>
repeat with i in a
>
set a to rest of a & i div -1
>
end repeat
This is a great one! I'm not sure I understand exactly how it does it, but
thanks. One question though, only one person has even made reference to this
and even that person didn't try this, but why not:
set a to {1, 3, 7}
in the first place. Does the original list have to be a list of strings or
can you just make it a list of integers to begin with?
Ken Fleisher
email@hidden