[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: select
- From: Michael Roth <mroth@...>
- Date: Fri, 20 Aug 2004 12:15:02 +0200
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hello,
Diego Nehab wrote:
|>>We also plan a new function select(i, ...), that returns its i-th
|>>argument. So you can loop over the varargs with something like
|
|
| I would prefer a skip() function that simply discarded the first 'n'
| arguments. Then you can enclose in () and have the effect of select().
What about a more general solution:
select(i,..) --> slice(i, i, ...)
skip(i, ...) --> slice(i, ...)
first(...) --> slice(1, 1, ...)
first(i, ...) --> slice(1, i, ...)
tail(...) --> slice(2, ...)
last(...) --> slice(-1, ...)
last(i, ...) --> slice(-i, ...)
Michael Roth
-----BEGIN PGP SIGNATURE-----
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iD8DBQFBJc8mSIrOxc3jOmoRAvOvAJ4g0lDrcpG/MsPs8xqksFrvUPMHjgCfbEDz
h20cOMchwt8fW3EMEap9LpU=
=0W0W
-----END PGP SIGNATURE-----