help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Accessing an element in an associativity list


From: Nordlöw
Subject: Accessing an element in an associativity list
Date: Tue, 9 Sep 2008 06:07:42 -0700 (PDT)
User-agent: G2/1.0

I have the following list of lists structure

(defvar c++-stl-containers
  '(
    ("string" "<string>" "String of char.")
    ("wstring" "<wstring>" "String of wide char (wchar_t).")
    ("vector" "<vector>" "Vectors contain contiguous elements stored
as an array.")
   )
 )

and I want to do something like this:
  (index-first 'c++-stl-containers "string" 2)
should evaluate to
  "<string>"

Is there any emacs lisp convenience function for accessing a row given
its, say, first (key) element? I know this is slow but speed is of no
importance here. Of course if a hash table is as easy to use then of
course I would like to use that.

Thanks in advance,
Nordlöw


reply via email to

[Prev in Thread] Current Thread [Next in Thread]