emacs-devel
[Top][All Lists]
Advanced

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

code for complement macro, new utility


From: Surendra Singhi
Subject: code for complement macro, new utility
Date: Mon, 14 Mar 2005 03:08:48 -0700
User-agent: Gnus/5.1006 (Gnus v5.10.6) XEmacs/21.4 (Rational FORTRAN, windows-nt)

Hello,

Below is a code for, potentially useful macro for emacs, similar to the
complement function in common lisp. It takes a function of any number of
arguments and returns a function which is the complement of that function.

(defmacro complement (fn) `(lambda (&rest args) (not (apply ,fn args))))

-- 
Surendra Singhi 

www.public.asu.edu/~sksinghi/

"O thou my friend! The prosperity of Crime is like unto the lightning, whose
traitorous brilliancies embellish the atmosphere but for an instant, in order
to hurl into death's very depths the luckless one they have dazzled." --
Marquis de Sade





reply via email to

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