From: PT <mailshield.gg@mailnull.com>
Subject: Re: Function binders in Elisp?
Date: Mon, 18 Apr 2005 20:15:53 +0200 [thread overview]
Message-ID: <op.spfw0rwep52o26@home-ca12fabbc0> (raw)
In-Reply-To: 1113841572.737369.303390@l41g2000cwc.googlegroups.com
On Mon, 18 Apr 2005 18:26:12 +0200, rgb <rbielaws@i1.net> wrote:
>
> So you are looking to do this?
>
> (defmacro bind-second (first &rest others)
> `(lambda (x) (,first x ,@others)))
>
> (remove-if (bind-second > 2)
> '(1 2 3 4))
>
> I'd think that would make the code a bit more confusing to read.
> But maybe it's just me.
In very simple cases it might be simpler than writing those lambda
functions. STL introduced functional programming paradigms in C++, that's
why I thought there is a standard way in Lisp to do it and the STL
developers simply implemented the same function binders in C++.
I know I can write my own macros to do that, but a standardized way would
be better, because it would be recognized by other Lisp programmers too.
From your answer it's clear there are no such standard macros in (e)lisp,
so it's not really worth the trouble, because it would only make my
programs harder to read for others.
next prev parent reply other threads:[~2005-04-18 18:15 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-04-17 17:47 Function binders in Elisp? PT
2005-04-18 16:26 ` rgb
2005-04-18 18:15 ` PT [this message]
2005-04-18 20:20 ` Thien-Thi Nguyen
2005-04-18 22:45 ` Pascal Bourguignon
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=op.spfw0rwep52o26@home-ca12fabbc0 \
--to=mailshield.gg@mailnull.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 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.