Scheme macros with 2 params -
Scheme macros with 2 params -
can define macro 1 param left , 1 right part of macro? want write kind of in programs:
(test = 10) to define new variables tried write macro:
(define-syntax = (syntax-rules () ((a _ b) (define b)))) but i've got error "bad syntax in: ="
since form determined first element you'd have problems test not beingness bound.
the right way this:
(= test 10) you write macro this:
(define-syntax = (syntax-rules () ((_ b) (define b)))) there go. without horrible infix syntax.
macros scheme
Comments
Post a Comment