Skip to content

Instantly share code, notes, and snippets.

@artyom-poptsov
Created February 2, 2015 13:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save artyom-poptsov/3bfeabb2ddaede52b7f7 to your computer and use it in GitHub Desktop.
Save artyom-poptsov/3bfeabb2ddaede52b7f7 to your computer and use it in GitHub Desktop.
define-method*
;; define*-like macro that allows to use keywords with GOOPS'
;; define-method.
(define-syntax define-method*
(syntax-rules ()
((_ (m (o <class>) (var defval) ...) body ...)
(define-method (m (o <class>) . args)
(let-keywords args #t ((var defval) ...)
body ...)))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment