Arc Forumnew | comments | leaders | submitlogin
3 points by vincenz 6139 days ago | link | parent

Idem for 'ac-qq1'

    (define (ac-qq1 level x env)
      (cond ((= level 0)
             (ac x env))
            ((eqv? (xcar x) 'unquote)
             (list 'unquote (ac-qq1 (- level 1) (cadr x) env)))
            ((and (eqv? (xcar x) 'unquote-splicing) (= level 1))
             (list 'unquote-splicing
                   (list 'ar-nil-terminate (ac-qq1 (- level 1) (cadr x) env))))
            ((eqv? (xcar x) 'quasiquote)
             (list 'quasiquote (ac-qq1 (+ level 1) (cadr x) env)))
            ((pair? x)
             (map (lambda (x) (ac-qq1 level x env)) x))
            (#t x)))