[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Clisp problem -- detecting a function
- To: clisp-list@ma2s2.mathematik.uni-karlsruhe.de
- Subject: Clisp problem -- detecting a function
- From: lrw@SDSC.EDU
- Date: Thu, 2 Jun 1994 10:16:06 -0700
Does anybody know how I can create a conditional statement based on
whether a function foo been defined or not? What I want to say:
(if (not (function-exists 'foo))
(load "file-containing-foo")
)
The problem is:
- (functionp 'foo) returns T whether or not the function has been
defined, and
- (compiled-function-p #'foo) generates an error if foo hasn't been defined.
So,
- How do I detect if function foo exists?
- Or if I can't do that, how do I use clisp to trap the error
(ignore-errors and handler-case don't seem to be there)?
thanks,
Len Wanger -- lrw@sdsc.edu
Project Sequoia 2000
San DiEgo Supercomputer Center