Giving info to CONSTANTP
- From: Philippe Lorin <palpalpalpal@xxxxxxxxx>
- Date: Fri, 30 Sep 2005 20:16:34 +0200
I have a function that produces constant results when given constant arguments, and I would like to make CONSTANTP aware of that, so that:
(constantp '(my-function 5 8)) -> T
The CLHS seems to say the treatment of that kind of expression is implementation-dependant. I'm using CMUCL; I looked into the docs and found only:
(declaim (ext:constant-function my-function))
which looks like it could have helped, but CONSTANTP doesn't seem to care.
(constantp '(+ 2 3)) gives NIL on CMUCL, so I'm not expecting much...
Any ideas?
PS: I'll also take ideas about achieving this: (constantp '(+ 2 3)) -> T .
- Follow-Ups:
- Re: Giving info to CONSTANTP
- From: Pascal Bourguignon
- Re: Giving info to CONSTANTP
- Prev by Date: Re: C++ and lisp and Games
- Next by Date: Re: C++ and lisp and Games
- Previous by thread: macro question
- Next by thread: Re: Giving info to CONSTANTP
- Index(es):