[<<][staapl][>>][..]
Sat Apr 25 12:10:12 CEST 2009

mixing pattern names and variable names

This doesn't work:

(define-syntax rpn/:
  (make-rpn-transformer
   (lambda (w d k)
     (let ((name (cadr w))
           (w+ (cddr w)))
       (k w+ (d-compile #`(name  ;; <- this
                            #,name)
                        (d-close d)))))))


The marked "name" is not an introduced identifier that will later
match to a literal "name" pattern as in :


(define-syntax rpn-define
  (syntax-rules (name)
    ((_ (name n) (type param) ...)
     (ns (rpn) (define n (rpn-lambda (type param) ...))))
    ((_)
     (void)) ;; ignore empty code
    ))



[Reply][About]
[<<][staapl][>>][..]