all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* fif function from On Lisp
@ 2008-03-04 12:31 weber
  2008-03-04 12:53 ` Johan Bockgård
  2008-03-06  0:34 ` Mike Mattie
  0 siblings, 2 replies; 6+ messages in thread
From: weber @ 2008-03-04 12:31 UTC (permalink / raw)
  To: help-gnu-emacs

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


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

end of thread, other threads:[~2008-03-06  0:34 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-03-04 12:31 fif function from On Lisp weber
2008-03-04 12:53 ` Johan Bockgård
2008-03-04 13:59   ` weber
2008-03-04 14:07     ` weber
2008-03-04 14:12       ` weber
2008-03-06  0:34 ` Mike Mattie

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.