(import simple-cells simple-tests) (define o% (cell 5 integer? odd?)) (define n% (cell 4 (lambda (x) (<= 3 x)))) (define lst (map cell '(0 1 2 3 4))) (define-test (Cells?) (cell? o%) ((cell-of? number?) o%) (not ((cell-of? number? even?) o%)) (not (condition-case (o% 4) ((exn) #f))) (= (o%) 5) (= (n%) 4) (= (n% 20) 4) (= (n%) 20) (not (condition-case (n% 2) ((exn) #f))) (= (o%) 5) (= ((list-ref lst 3)) 3) (= ((list-ref lst 3) 30) 3) (= ((list-ref lst 3)) 30) ) (compound-test (SIMPLE-CELLS) (Cells?) )