[ltk-user] C?N? :)

Kenny Tilton ktilton at nyc.rr.com
Sat Feb 4 08:32:58 UTC 2006


(defmacro c?n (&body body)
  `(make-c-dependent
    :code nil ;; `(without-c-dependency ,@,body)
    :inputp t
    :value-state :unevaluated
    :rule (c-lambda (without-c-dependency , at body))))

Took some supporting changes, but only in reducing discipline and not 
optimizing the Cell away (for having no dependencies).

I hope this implies the desired functionality:

(def-cell-test test-c?n ()
  (let ((self (make-be 'c?n-class
                :aaa (c?n (+ (^bbb) 2))
                :bbb (c-in 40))))
    (ct-assert (= (^bbb) 40))
    (ct-assert (= (^aaa) 42))
    (ct-assert (= (^sum) 82))
    (setf (^bbb) 100)
    (ct-assert (= (^bbb) 100))
    (ct-assert (= (^aaa) 42))
    (ct-assert (= (^sum) 142))
    (setf (^aaa) -58)
    (ct-assert (= (^aaa) -58))
    (ct-assert (= (^bbb) 100))
    (ct-assert (= (^sum) 42))))

I will use it now to simplify..... Cells-Ltk? Looks to be done enough 
that I can start using it. Not sure where it should go, though. Hmmmm.....

ken





More information about the ltk-user mailing list