all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Nikos Apostolakis <nikos.ap@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: Re: Need help in understanding an example of recursion
Date: Sat, 02 Jun 2007 17:11:54 -0400	[thread overview]
Message-ID: <87ira6vz6t.fsf@Sullivan.bcc.cuny.edu> (raw)
In-Reply-To: 87sl9a9lb2.fsf@thalassa.lan.informatimago.com

Pascal Bourguignon <pjb@informatimago.com> writes:

> Nikos Apostolakis <nikos.ap@gmail.com> writes:
>> Is there some subtle[0] point about recursion that I am missing?
>> Any help in understanding this will be greatly appreciated.
>
> This is not a question of recursion.  It's a question of something you
> should have learned the first day of your first programming course,
> that you  should not use global variables and you should initialize
> your variables!
>
>
> Your variable named value is not a local variable of
> nea-next-partition.    Moreover, value is a variable that's bound to
> new values automatically, read it's documentation. C-h v value RET
>


This is embarasing.  I actually  red the documentation,  and I
thought that in the dolist construction the third argument is
automatically local.  Not sure where I got the impression since 
the example in the manual does initialize the variable!

Thanks for the answer and the tips,
Nikos

  reply	other threads:[~2007-06-02 21:11 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <mailman.1503.1180804721.32220.help-gnu-emacs@gnu.org>
2007-06-02 20:02 ` Need help in understanding an example of recursion Pascal Bourguignon
2007-06-02 21:11   ` Nikos Apostolakis [this message]
2007-06-02 16:09 Nikos Apostolakis

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

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

  git send-email \
    --in-reply-to=87ira6vz6t.fsf@Sullivan.bcc.cuny.edu \
    --to=nikos.ap@gmail.com \
    --cc=help-gnu-emacs@gnu.org \
    /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.
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.