(use simple-cells simple-exceptions simple-tests (only data-structures list-of?)) (define-test (cells?) (check (define o% (cell 5 number? odd?)) (cell? o%) (not (condition-case (o% 4) ((exn arguments) #f))) (= (o%) 5) (define n% (cell 4 (named-lambda 3<=? (x) (<= 3 x)))) (= (n%) 4) ((list-of? procedure?) (receive (val checks) (n%) checks)) (n% 20) (= (n%) 20) (= (o%) 5) ((list-of? procedure?) (receive (val checks) (o%) checks)) )) (compound-test (SIMPLE-CELLS) (cells?) )