From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Ted Zlatanov Newsgroups: gmane.emacs.help Subject: Re: Indexing a vector Date: Wed, 10 Sep 2008 11:52:14 -0500 Organization: =?utf-8?B?0KLQtdC+0LTQvtGAINCX0LvQsNGC0LDQvdC+0LI=?= @ Cienfuegos Message-ID: <86bpyw2bb5.fsf@lifelogs.com> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1221068474 7216 80.91.229.12 (10 Sep 2008 17:41:14 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 10 Sep 2008 17:41:14 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Sep 10 19:42:03 2008 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1KdThJ-0004Ws-41 for geh-help-gnu-emacs@m.gmane.org; Wed, 10 Sep 2008 19:41:45 +0200 Original-Received: from localhost ([127.0.0.1]:59235 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KdTgI-0005qS-Tt for geh-help-gnu-emacs@m.gmane.org; Wed, 10 Sep 2008 13:40:42 -0400 Original-Path: news.stanford.edu!headwall.stanford.edu!newshub.sdsu.edu!feeder.news-service.com!news.k-dsl.de!news.albasani.net!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 13 Original-X-Trace: news.albasani.net sP1RLN5Z8ZJ/EJWvLy82cq9LHxSXq668ntFk8ba2f52fqnSzh6DtII2W9BgE9WMx3aqagyclcgWbL/mLoq8x07izhDzhAxndAINTAGsjXeLAvyfyYNUQGPhsU7dFzhDE Original-X-Complaints-To: abuse@albasani.net Original-NNTP-Posting-Date: Wed, 10 Sep 2008 16:52:15 +0000 (UTC) X-User-ID: HqRNLbbuQJiuyDIIRPVIw0FraQVBUtX9R9FnF8Wq73E= X-Face: bd.DQ~'29fIs`T_%O%C\g%6jW)yi[zuz6; d4V0`@y-~$#3P_Ng{@m+e4o<4P'#(_GJQ%TT= D}[Ep*b!\e,fBZ'j_+#"Ps?s2!4H2-Y"sx" Cancel-Lock: sha1:SlluKwTxZnFDheGze5OIQAPNFoQ= sha1:KqPV+o19Jb+DyBB4QvO2w2FRmSg= User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.0.60 (gnu/linux) X-NNTP-Posting-Host: QvsYSRqq9X2RjELOASXSNx1I64/QCDwC/g2H/5uZAqg= Original-Xref: news.stanford.edu gnu.emacs.help:162054 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:57396 Archived-At: On Wed, 10 Sep 2008 07:53:04 -0700 (PDT) Nordlöw 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