|
Subject: Re: Another scheme/dsssl question From: Chris Maden <crism@xxxxxxx> Date: Mon, 29 Dec 1997 16:25:41 -0500 |
[Norm Walsh]
> Is it possible to test for the existance of a definition?
>
> Suppose I want to make it possible for a derived stylesheet to
> override a value. I'd like to write something like this:
>
> (define default-foo '("x" "y" "z"))
> ...
> (if (some-predicate? foo)
> foo
> default-foo)
>
> Is that possible?
You can test for procedure-ness with (procedure?). It's not clear
from 8.5.10.1 that this will *only* return #t for things actually
(define)d, since the Standard defines data types in terms of
predicates that return #t for them, but it's worth a shot.
-Chris
--
<!NOTATION SGML.Geek PUBLIC "-//Anonymous//NOTATION SGML Geek//EN">
<!ENTITY crism PUBLIC "-//O'Reilly//NONSGML Christopher R. Maden//EN"
"<URL>http://www.oreilly.com/people/staff/crism/ <TEL>+1.617.499.7487
<USMAIL>90 Sherman Street, Cambridge, MA 02140 USA" NDATA SGML.Geek>
DSSSList info and archive: http://www.mulberrytech.com/dsssl/dssslist
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| Another scheme/dsssl question, Norman Walsh | Thread | Re: Another scheme/dsssl question, Norman Walsh |
| Re: scheme/dsssl question, Chris Maden | Date | Re: Another scheme/dsssl question, Norman Walsh |
| Month |