Re: Another scheme/dsssl question

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
  • Another scheme/dsssl question
    • Norman Walsh - from mail1.ability.netby web4.ability.net (8.8.5/8.6.12) with ESMTP id NAA24872Mon, 29 Dec 1997 13:49:04 -0500 (EST)
      • Chris Maden - from mail1.ability.netby web4.ability.net (8.8.5/8.6.12) with ESMTP id QAA25937Mon, 29 Dec 1997 16:21:38 -0500 (EST) <=
        • Norman Walsh - from mail1.ability.netby web4.ability.net (8.8.5/8.6.12) with ESMTP id QAA26170Mon, 29 Dec 1997 16:37:10 -0500 (EST)
        • Joe English - from mail1.ability.netby web4.ability.net (8.8.5/8.6.12) with ESMTP id SAA26850Mon, 29 Dec 1997 18:53:30 -0500 (EST)
          • Norman Walsh - from mail1.ability.netby web4.ability.net (8.8.5/8.6.12) with ESMTP id JAA07051Tue, 30 Dec 1997 09:04:54 -0500 (EST)