Re: Another scheme/dsssl question

Subject: Re: Another scheme/dsssl question
From: Norman Walsh <norm@xxxxxxxxxxxxx>
Date: Mon, 29 Dec 1997 16:35:23 -0500
> > 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.

I think I wasn't as clear as I could have been.  The difficulty
I'm having is that, for example,

  (list? foo)

produces an error message if "foo" is entirely undefined.  I'm
looking for a predicate (or some other mechanism) for testing if
a given "thing" is defined at all.

--norm




 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)