unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Accessing an element in an associativity list
@ 2008-09-09 13:07 Nordlöw
  2008-09-09 13:28 ` Joost Kremers
  0 siblings, 1 reply; 3+ messages in thread
From: Nordlöw @ 2008-09-09 13:07 UTC (permalink / raw
  To: help-gnu-emacs

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


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2008-09-09 14:47 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-09-09 13:07 Accessing an element in an associativity list Nordlöw
2008-09-09 13:28 ` Joost Kremers
2008-09-09 14:47   ` Tassilo Horn

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).