hi
suppose i have a symbol arg which is say, 'expt or '* or '7, and i want to
check whether the corresponding expt or * or 7 is a defined function or
not.
So i would try (functionp '*) or (functionp '7) viz. i need (functionp
arg), but then there is a missing # because (functionp arg) gives nil
when arg = '*.
So how do i check?
thanks a lot, pls reply to my email-id..
novice-ly yours
--Deepak
Deepak Goel <·····@Glue.umd.edu> writes:
> suppose i have a symbol arg which is say, 'expt or '* or '7, and i want to
> check whether the corresponding expt or * or 7 is a defined function or
> not.
>
> So i would try (functionp '*) or (functionp '7) viz. i need (functionp
> arg), but then there is a missing # because (functionp arg) gives nil
> when arg = '*.
>
> So how do i check?
Look up fboundp in your favorite CL reference.
-matt
Deepak Goel <·····@glue.umd.edu> wrote:
+---------------
| So i would try (functionp '*) or (functionp '7) viz. i need (functionp
| arg), but then there is a missing # because (functionp arg) gives nil
| when arg = '*.
+---------------
That's because '* isn't a function -- it's a symbol. If you
try it with an actual function (such as #'*) it works fine:
> (defvar arg #'*)
ARG
> arg
#<Function * {1084019}>
> (functionp arg)
T
>
-Rob
-----
Rob Warnock, 8L-846 ····@sgi.com
Applied Networking http://reality.sgi.com/rpw3/
Silicon Graphics, Inc. Phone: 650-933-1673
1600 Amphitheatre Pkwy. FAX: 650-933-0511
Mountain View, CA 94043 PP-ASEL-IA