On Mon, 18 Apr 2005 18:26:12 +0200, rgb <[EMAIL PROTECTED]> 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.
_______________________________________________
Help-gnu-emacs mailing list
Help-gnu-emacs@gnu.org
http://lists.gnu.org/mailman/listinfo/help-gnu-emacs

Reply via email to