Arc Forumnew | comments | leaders | submitlogin
1 point by rincewind 5869 days ago | link | parent

Pythonic:

  (def paren-adder ((o delimiter '$)) :
     rfn parens (expr) :
        if atom.expr expr :
            let (hd . tl) expr :
               if (is hd delimiter)
                  (list parens.tl)
                  (cons parens.hd parens.tl))