From 02e720ff76049e21c1206576442683818323d574 Mon Sep 17 00:00:00 2001 From: Andy Wingo Date: Thu, 23 Oct 2008 15:00:19 +0200 Subject: [PATCH] method is a defmacro. * oop/goops.scm (method): Make into a defmacro. --- oop/goops.scm | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/oop/goops.scm b/oop/goops.scm index bb85f1119..2a250c7fa 100644 --- a/oop/goops.scm +++ b/oop/goops.scm @@ -467,7 +467,7 @@ #:specializers specializers #:procedure procedure)) -(define method +(define-macro (method args . body) (letrec ((specializers (lambda (ls) (cond ((null? ls) (list (list 'quote '()))) @@ -482,16 +482,12 @@ (cons (if (pair? (car ls)) (caar ls) (car ls)) (formals (cdr ls))) ls)))) - (procedure->memoizing-macro - (lambda (exp env) - (let ((args (cadr exp)) - (body (cddr exp))) - `(make - #:specializers (cons* ,@(specializers args)) - #:procedure (lambda ,(formals args) - ,@(if (null? body) - (list *unspecified*) - body)))))))) + `(make + #:specializers (cons* ,@(specializers args)) + #:procedure (lambda ,(formals args) + ,@(if (null? body) + (list *unspecified*) + body))))) ;;; ;;; {add-method!}