no title added by lemonpie on Tue Nov 22 18:28:01 2016

(define-syntax frob
  (syntax-rules ()
    ((_ x y)
     (string->symbol (string-append (->string x) (->string y))))))

(define-er-macro-transformer (my-def4 x r c)
  (let* [
         ;; (frob (lambda (x y)
         ;;         (string->symbol (string-append (symbol->string x) y))))
         (class-name (second x))
         (instantiator (frob class-name "-new"))
         (predicate (frob class-name "?"))
         (%set (r 'set!))]
    `(begin
       (,%set ,instantiator 'my-def4)
       (,%set ,predicate 'my-def4))))