(defun withdraw (object &rest args) (apply (get-method object 'withdraw) args)) (defun deposit (object &rest args) (apply (get-method object 'deposit) args)) (defun balance (object &rest args) (apply (get-method object 'balance) args))のように定義でき,
> (balance acc) 10.0 > (withdraw acc 3) 7.0 > (deposit acc 5) 12.0 > (balance acc) 12.0のように使う.このaccの引数に違うアカウント の種類である下のtemp-accountをもってきても
(defun temp-account (&optional (balance 0.00) (interest-rate .06)) #'(lambda (message) (case message (withdraw #'(lambda (amt) (decf balance amt))) (deposit #'(lambda (amt) (incf balance amt))) (balance #'(lambda () balance)) (interest #'(lambda () (incf balance (* interest-rate balance))))))) > (setq bcc (temp-account 10.0)) #<Interpreted Closure ...> > (balance bcc) 10.0 > (withdraw bcc 3) 7.0 > (deposit bcc 5) 12.0 > (balance bcc) 12.0balance,withdrawなどの同じ関数を用いることができる わけである.これは,このアカウントのデータaccやbcc それぞれがそのデータの中に手続きと個別データを 保存しているから可能になるわけである.