emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] Tangling is broken in git master


From: Nicolas Goaziou
Subject: Re: [O] Tangling is broken in git master
Date: Mon, 13 Aug 2012 17:25:22 +0200

Hello,

Bastien <address@hidden> writes:

> Eric Schulte <address@hidden> 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 via email to

[Prev in Thread] Current Thread [Next in Thread]