Mike Cifelli
77a341a1a7
Added a class to compute compound interest. An alias for FUNCALL has been added: CALL Refactored some acceptance tests to load code from files.
7 lines
175 B
Common Lisp
7 lines
175 B
Common Lisp
(defun counter-class ()
|
|
(let ((counter 0))
|
|
(lambda (msg)
|
|
(case msg
|
|
((:inc) (setq counter (+ counter 1)))
|
|
((:dec) (setq counter (- counter 1)))))))
|