|
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 |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| Re: Another scheme/dsssl question, Chris Maden | Thread | Re: Another scheme/dsssl question, Joe English |
| Re: Another scheme/dsssl question, Chris Maden | Date | Re: Another scheme/dsssl question, Joe English |
| Month |