• 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: I want to convert a list of integers to their negative self
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: I want to convert a list of integers to their negative self
      • From: Paul Berkowitz <email@hidden>
  • Prev by Date: Re: Text without formatting (OS 9.1)
  • Next by Date: Re: Records
  • Previous by thread: Re: I want to convert a list of integers to their negative self
  • Next by thread: Re: I want to convert a list of integers to their negative self
  • Index(es):
    • Date
    • Thread