;; class_accumulator.l ;; CSC 416 - Graci ;; Jacob Peck ;; 20101015 ;; defines the accumulator class and related methods ;; class accumulator ;; slots: value - the current value (defclass accumulator () ( (value :accessor accumulator-value :initarg :value :initform 0) ) ) ;; inc method ;; increments the accumulator's value by the given parameter (defmethod inc ((a accumulator) (v integer)) (setf (accumulator-value a) (+ (accumulator-value a) v)) )