From: Ted Zlatanov <tzz@lifelogs.com>
To: help-gnu-emacs@gnu.org
Subject: Re: Indexing a vector
Date: Wed, 10 Sep 2008 11:52:14 -0500 [thread overview]
Message-ID: <86bpyw2bb5.fsf@lifelogs.com> (raw)
In-Reply-To: b41b96b6-1b43-49fb-8ded-6c8c1d44f268@x35g2000hsb.googlegroups.com
On Wed, 10 Sep 2008 07:53:04 -0700 (PDT) Nordlöw <per.nordlow@gmail.com> wrote:
N> How do index an element in a vector? nth() works only for lists.
N> :(... 0 '[1 2])
N> Why on earth isn't such a basic operator compatible with both lists
N> and vectors (sequences)?
The Emacs Lisp manual (chapter 6) covers this. A vector is an array
which is a sequence, but not a list (so you can use the `elt' function
in addition to `aref' to look up elements). `nth' works only on lists.
Ted
prev parent reply other threads:[~2008-09-10 16:52 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-09-10 14:53 Indexing a vector Nordlöw
2008-09-10 15:53 ` Drew Adams
2008-09-10 15:57 ` Juanma Barranquero
2008-09-10 16:52 ` Ted Zlatanov [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=86bpyw2bb5.fsf@lifelogs.com \
--to=tzz@lifelogs.com \
--cc=help-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).