From: Michael Heerdegen via Users list for the GNU Emacs text editor <help-gnu-emacs@gnu.org>
To: help-gnu-emacs@gnu.org
Subject: Re: Lambdas for beginners broken - help, please
Date: Wed, 24 Jul 2024 22:03:48 +0200 [thread overview]
Message-ID: <87ttgezhej.fsf@web.de> (raw)
In-Reply-To: CADs++6iT34zq+U0+zuoeKfdn5ow23+2f+nY-wJTWi2xXtMC-rA@mail.gmail.com
Eduardo Ochs <eduardoochs@gmail.com> writes:
> lambda is a Lisp macro in ‘subr.el’.
>
> (lambda ARGS [DOCSTRING] [INTERACTIVE] BODY)
>
> Return an anonymous function.
> Under dynamic binding, a call of the form (lambda ARGS DOCSTRING
> INTERACTIVE BODY) is self-quoting; the result of evaluating the
> lambda expression is the expression itself.
Agreed, this is at least misleading. Stefan, Eli?
> So, question: is there a recommended way to convert the result of
>
> (eval '(lambda (n) (+ n 2)) nil)
>
> back to the
>
> (lambda (n) (+ n 2))
>
> ?
If you really think you want to do this - have a look at "cl-print.el" and
the implementation of `cl-print-object' for interpreted-function
arguments, starting around line number 240. This shows how to dissect
those objects.
Michael.
next prev parent reply other threads:[~2024-07-24 20:03 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-24 8:43 Lambdas for beginners broken - help, please Eduardo Ochs
2024-07-24 13:12 ` Michael Heerdegen via Users list for the GNU Emacs text editor
2024-07-24 16:43 ` Eduardo Ochs
2024-07-24 20:03 ` Michael Heerdegen via Users list for the GNU Emacs text editor [this message]
2024-07-24 22:06 ` Eduardo Ochs
2024-07-25 5:18 ` Eli Zaretskii
2024-07-25 9:44 ` Eduardo Ochs
2024-07-25 11:33 ` Eli Zaretskii
2024-07-25 12:49 ` Eduardo Ochs
2024-07-25 14:53 ` Eli Zaretskii
2024-07-24 16:54 ` tpeplt
2024-07-24 18:49 ` Michael Heerdegen via Users list for the GNU Emacs text editor
2024-07-24 19:29 ` tpeplt
2024-07-24 19:58 ` Michael Heerdegen via Users list for the GNU Emacs text editor
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=87ttgezhej.fsf@web.de \
--to=help-gnu-emacs@gnu.org \
--cc=michael_heerdegen@web.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.
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.