Re: Comparing lists

jon klein <[email protected]>
Newsgroups gmane.comp.breve
Message-ID <[email protected]>
On Feb 2, 2004, at 10:33 AM, Rick Giuly wrote:

> What do you think about having a special syntax to get the size of a 
> list:
>
> size of myList
> or
> size(myList)
> or
> |myList|    #i like this one
>
> I think that would make clearer code than cast to integer.

I think |myList| would be a good idea.  I'm planning to allow | x | to 
be
used for the absolute value of an integer or float, so perhaps | x | 
could
be a general operator to give the "magnitude" of an expression:

| myList |   -> length of list
| myInt |    -> absolute value of int
| myFloat |  -> absolute value of float
| myVector | -> length of vector
| myString | -> number of characters in the string [?]

- jon klein

_______________________________________________
breve mailing list
[email protected]
http://www.spiderland.org/mailman/listinfo/breve
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.