title: How to check that a macro parameter is an empty list within syntax-case?
body: <p>How can I test whether a syntax pattern parameter is an empty list? I am testing in guile.</p>
  
  <pre><code>(define-syntax mkl
    (lambda (x)
      (syntax-case x ()
        [(_ var params code)
         (if (null? (syntax-&gt;datum #'params)); doesn't match anyway !!!???
             #'(lambda (var) code)
             #'(lambda (var) (cons 1 code)))])))
  
  ;;; try: expecting: (100 200) but got: (1 100 200)
  (display
    ((mkl s '() s) '(100 200)))
  (newline)
  </code></pre>
  
  <p>However, if I test against a number, it works:</p>
  
  <pre><code>(define-syntax mkl2
    (lambda (x)
      (syntax-case x ()
        [(_ var params code)
         (if (= (syntax-&gt;datum #'params) 0); matches OK
         #'(lambda (var) code)
         #'(lambda (var) (cons 1 code)))])))
  
  ;;; try: expecting: (100 200) and it works OK
  (display
   ((mkl2 s 0 s) '(100 200)))
  (newline)
  </code></pre>