all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* build-in function for obtaining the index of an element of a list
@ 2012-01-04  6:33 ishi soichi
  2012-01-04 12:51 ` Juanma Barranquero
  0 siblings, 1 reply; 3+ messages in thread
From: ishi soichi @ 2012-01-04  6:33 UTC (permalink / raw)
  To: help-gnu-emacs

[-- Attachment #1: Type: text/plain, Size: 379 bytes --]

I have a question about Emacs Lisp.

Is there any Emacs built-in function that returns the index of an element
of a list?

More specifically, say I have a list

(setq lista '("apple" "banana" "orange))

then implement the function, which I want,

(functionName lista "banana")    ; => 1

If not, please give me an example of such function definition.

Thanks in advance!

soichi

[-- Attachment #2: Type: text/html, Size: 618 bytes --]

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

end of thread, other threads:[~2012-01-04 23:52 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-04  6:33 build-in function for obtaining the index of an element of a list ishi soichi
2012-01-04 12:51 ` Juanma Barranquero
2012-01-04 23:52   ` ishi soichi

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.