Path: utzoo!mnetor!uunet!husc6!yale!Ram-Ashwin From: Ram-Ashwin@cs.yale.edu (Ashwin Ram) Newsgroups: comp.emacs Subject: Re: functionp Message-ID: <20954@yale-celray.yale.UUCP> Date: 5 Jan 88 16:35:55 GMT References: <39315@ti-csl.CSNET> Sender: root@yale.UUCP Reply-To: Ram-Ashwin@cs.yale.edu (Ashwin Ram) Organization: Computer Science, Yale University, New Haven, CT 06520-2158 Lines: 26 In-reply-to: ekberg@home.csc.ti.com (Tom Ekberg) In article <39315@ti-csl.CSNET>, ekberg@home (Tom Ekberg) writes: > ... How does the following > definition appear to your critical eyes? > > (defun functionp (object) > "Returns t if OBJECT is a function." > (cond ((subrp object) > t) > ((commandp object) > t) > ((listp object) > (eq (car object) 'lambda)) > (t > nil))) How about just: (or (subrp object) (commandp object) (and (listp object) (eq (car object) 'lambda))) -- Ashwin Ram -- ARPA: Ram-Ashwin@cs.yale.edu UUCP: {decvax,linus,seismo}!yale!Ram-Ashwin BITNET: Ram@yalecs