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