Skip to content
Peter Lewis edited this page Oct 1, 2020 · 4 revisions

function-exists? tests if a function named obj exists.

Parameter Description
obj String or symbol to test for existence

Example

Example 1: Check if a function "s5-init", which is declared in a different module, exists to add a new monitor driver to an existing list of supported drivers.

(if (function-exists? "s5-init") 
  (eval '(monitor-add-driver (list "S/5" s5-init s5-run s5-close))))
Clone this wiki locally