all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Function binders in Elisp?
@ 2005-04-17 17:47 PT
  2005-04-18 16:26 ` rgb
  0 siblings, 1 reply; 5+ messages in thread
From: PT @ 2005-04-17 17:47 UTC (permalink / raw)


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))

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2005-04-18 22:45 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-04-17 17:47 Function binders in Elisp? PT
2005-04-18 16:26 ` rgb
2005-04-18 18:15   ` PT
2005-04-18 20:20     ` Thien-Thi Nguyen
2005-04-18 22:45     ` Pascal Bourguignon

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.