[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Date: Sun, 9 Mar 86 18:40 EST
From: Kent M Pitman <KMP@SCRC-STONY-BROOK.ARPA>
For the next edition, could we introduce functions TRUE and FALSE ...
Why not just a function CONSTFN that takes a value and returns a function
that will return that value?
(DEFUN CONSTFN (X) #'(LAMBDA (&REST Z) (DECLARE (IGNORE Z)) X))
or, for more generality:
(DEFUN CONSTFN (&REST X) #'(LAMBDA (&REST Z) (DECLARE (IGNORE Z)) (VALUES-LIST X)))
Then instead of #'TRUE you just say (CONSTFN T). All very Schemish.
(And I know at least thirty people out there will scream with horror,
"But that CONSES!" and they will be right.)
- TRUE, FALSE
- From: Kent M Pitman <KMP@SCRC-STONY-BROOK.ARPA>