help-gnu-emacs
[Top][All Lists]
Advanced

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

fif function from On Lisp


From: weber
Subject: fif function from On Lisp
Date: Tue, 4 Mar 2008 04:31:19 -0800 (PST)
User-agent: G2/1.0

Hi folks.
For some reason this function from On Lisp doesn't work:

(defun fif (a b &optional c)
  '(lambda (x)
        (if (funcall a x)
                (funcall b x)
                (unless (null c) (funcall c x)))))

I should be able to call it like this:

(mapcar (fif 'zerop '1+ 1-) '(0 1 2 3) => (1 0 1 2)

but i'm probably missing something that is differs from Common Lisp to
Elisp.

Thanks in advance,
weber


reply via email to

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