scheme でなんかできた

(define-syntax count-down00
  (ir-macro-transformer
    (lambda (form inject compare?)
      (let ((data-n (cadr form))
            (sp  (caddr form))
            (body (cdddr form)))
        (let ((sp-list-rv (list? sp)))
          (let ((key-word (if sp-list-rv (car sp) sp))
                (num (if sp-list-rv (cadr sp) 0)))
            (print sp)
            (if (not (number? num))
              (error "no number"))
            (if (compare? key-word 'first)
              (define num (+ data-n num))
              (if (not (compare? key-word 'last))
                (error "no support keywaord")))
            `(,(inject 'cons) ,num ,@body)))))))

chicken scheme でマクロ使う。なんかできるな。