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

Clisp problem -- detecting a function

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.


- 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)?


Len Wanger -- lrw@sdsc.edu
Project Sequoia 2000
San DiEgo Supercomputer Center