[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Newbie: references in elisp
From: |
Andreas Roehler |
Subject: |
Re: Newbie: references in elisp |
Date: |
Tue, 23 Jan 2007 21:24:59 +0100 |
User-agent: |
KNode/0.9.2 |
Pawel wrote:
> Hallo group members!
> I want my function return one than one element. I C I do it
> using references. Is there something like reference in elisp?
> .. or maybe I should use lists with some additional trick?
>
> regards
> Pawel
;; Just one possibility:
(setq my-list '("a" "b" "c"))
(car my-list) => "a"
(defun one-by-one (my-list)
"This is an example"
(let ((many my-list))
(while many
(insert (car many))
(setq many (cdr many)))))
(one-by-one my-list) => abc
__
Andreas Roehler