Ok so I am trying to make a "make-set" program using objects. I have all ready programmed all the basic procedures for sets like union and intersect and member-of so this is what i ahve so far for my make-set program using object:
(define make-set
(lambda ()
(let ((s '()))
(lambda (msg e)
(case msg
('add (set! s (cons e s))
('member? (member-of e s))
('intersect (intersect e s))
('superset (superset e s))
('subset (subset e s)))))))
So does this work..is this using object? If not could you show me how...Thanks