Kenny Tilton writes:
Thomas F. Burdick wrote:
Okay, how are these for a start?
(defmacro cv (&optional (value +unbound+)) `(cells::make-c-variable :value ,value))
(defmacro c-formula ((&rest keys &key lazy cyclic-p cyclic-value) &body forms) (declare (ignore lazy cyclic-p cyclic-value)) `(cells::make-c-dependent :code ',forms :rule (c-lambda ,@forms) ,@keys))
(defmacro c-variable ((&rest keys &key cyclic-p) &optional (value nil valuep)) (declare (ignore cyclic-p)) `(cells::make-c-variable :value ,(if valuep value '+unbound+) ,@keys))
looks ok. but...
Is there a definition for +unbound+ missing?
Maybe if I stare at it long enough it will come to me, but why not do
on c-variable what is proposed for cv, viz.,:
&optional (value '+unbound+)
Hmm, maybe I should have edited these on their way out of my utils file. +unbound+ is from (defconstant +unbound+ '+unbound+), from my unbound-cells hack from before. As for (2), yeah, that would be simpler. It was a mental-cut-and-paste error, from having written a bunch of macros right before that, that needed the supplied-p value.