unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Andreas Roehler <andreas.roehler@online.de>
Subject: Re: Newbie: references in elisp
Date: Tue, 23 Jan 2007 21:24:59 +0100	[thread overview]
Message-ID: <ep5qdc$upo$1@online.de> (raw)
In-Reply-To: mailman.3471.1169572533.2155.help-gnu-emacs@gnu.org

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

       reply	other threads:[~2007-01-23 20:24 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <mailman.3471.1169572533.2155.help-gnu-emacs@gnu.org>
2007-01-23 20:24 ` Andreas Roehler [this message]
2007-01-23 20:24 ` Newbie: references in elisp Andreas Roehler
2007-01-24  0:58 ` Harold Lee
2007-01-23 17:12 Pawel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='ep5qdc$upo$1@online.de' \
    --to=andreas.roehler@online.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).