emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Nicolas Goaziou <n.goaziou@gmail.com>
To: Bastien <bzg@gnu.org>
Cc: Bernt Hansen <bernt@norang.ca>,
	emacs-orgmode@gnu.org, Eric Schulte <eric.schulte@gmx.com>
Subject: Re: Tangling is broken in git master
Date: Mon, 13 Aug 2012 17:25:22 +0200	[thread overview]
Message-ID: <87pq6uq0f1.fsf@gmail.com> (raw)
In-Reply-To: <87393qyhst.fsf@gnu.org> (Bastien's message of "Mon, 13 Aug 2012 16:42:42 +0200")

Hello,

Bastien <bzg@gnu.org> writes:

> Eric Schulte <eric.schulte@gmx.com> writes:
>
>> I'm surprised that elisp doesn't provide any mechanism for local
>> anonymous functions.  
>
> (let ((my-local-func (lambda (a) (message a))))
>      (funcall my-local-func "Hello!"))
>
> is fine.
>
> It's just for recursive local function -- letrec provides it now, 
> but apparently cl-labels was needed for that before.

You can have recursive local functions:

#+begin_src emacs-lisp
(let* (len                              ; For byte compiler.
       (len (lambda (l) (if (not l) 0
                     (1+ (funcall len (cdr l)))))))
  (funcall len '(1 2 3)))
#+end_src


Regards,

-- 
Nicolas Goaziou

  reply	other threads:[~2012-08-13 15:29 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-12  1:03 Tangling is broken in git master Bernt Hansen
2012-08-12  6:27 ` Achim Gratz
2012-08-13  1:57   ` Bernt Hansen
2012-08-12  8:43 ` Bastien
2012-08-13  1:55   ` Bernt Hansen
2012-08-13  5:43     ` Bastien
2012-08-13 13:44       ` Eric Schulte
2012-08-13 13:56         ` Bastien
2012-08-13 14:18           ` Eric Schulte
2012-08-13 14:42             ` Bastien
2012-08-13 15:25               ` Nicolas Goaziou [this message]
2012-08-13 19:00                 ` Bastien
2012-08-13 14:46             ` Nick Dokos
2012-08-13 14:53               ` Bastien
2012-08-13 15:38                 ` Nick Dokos
2012-08-13 19:00                   ` Bastien

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.orgmode.org/

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

  git send-email \
    --in-reply-to=87pq6uq0f1.fsf@gmail.com \
    --to=n.goaziou@gmail.com \
    --cc=bernt@norang.ca \
    --cc=bzg@gnu.org \
    --cc=emacs-orgmode@gnu.org \
    --cc=eric.schulte@gmx.com \
    /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 public inbox

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

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