[rjain-utils-cvs] CVS formulate/src
rjain
rjain at common-lisp.net
Wed Nov 11 08:54:08 UTC 2009
Update of /project/rjain-utils/cvsroot/formulate/src
In directory cl-net:/tmp/cvs-serv9275/src
Modified Files:
variables.lisp
Log Message:
default formulator class for variables in the same way we do for slots
--- /project/rjain-utils/cvsroot/formulate/src/variables.lisp 2009/11/04 21:41:35 1.2
+++ /project/rjain-utils/cvsroot/formulate/src/variables.lisp 2009/11/11 08:54:08 1.3
@@ -3,13 +3,17 @@
(defmacro define-formulated-variable (name formula
&key declare
documentation
- (formulator-class 'lazy-formula-formulator-sink)
+ (formula-p t)
+ formulator-class
formulator-options)
`(progn
(define-symbol-macro ,name (formulate-variable ',name))
(setf (documentation ',name 'variable) ,documentation)
(setf (symbol-value ',name)
- (make-instance ',formulator-class
+ (make-instance ',(or formulator-class
+ (if formula-p
+ 'lazy-formula-formulator-sink
+ 'simple-formulator-source))
'formula ',formula
'formula-function (lambda () (declare , at declare) ,formula)
, at formulator-options))
More information about the Rjain-utils-cvs
mailing list