This is the mail archive of the kawa@sources.redhat.com mailing list for the Kawa project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
;; define-operator macro (defmacro define-operator (name operator) `((define-simple-class ,name () ((execute . operands) (apply ,operator operands)))))
;; non-macro version (define-simple-class <plus> () ((execute . operands) (apply + operands)))
;; macro version (define-operator <plus> +)
(define five (invoke (make <plus>) 'execute 2 3)) (display five)
Attachment:
smime.p7s
Description: S/MIME Cryptographic Signature
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |