[Top][All Lists]

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

Function binders in Elisp?

From: PT
Subject: Function binders in Elisp?
Date: Sun, 17 Apr 2005 19:47:53 +0200
User-agent: Opera M2/7.54 (Win32, build 3865)

For predicates I usually use lambda functions. For example:

  (require 'cl)
  (remove-if (lambda (x) (> x 2))
             '(1 2 3 4))

I'm not a lisp guru, therefore I often wonder if there are standard binder functions in emacs lisp like for example bind2nd in C++ STL which transforms a binary function into an unary function:

  find_if(L.begin(), L.end(), bind2nd(greater<int>(), 2)) // C++

So that I can write something like this:

  (remove-if (bind-second '< 2)
             '(1 2 3 4))

reply via email to

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