Arc Forumnew | comments | leaders | submitlogin
2 points by ylando 5056 days ago | link | parent

Here is my idea of scope implementation:

   (def split@ (lst (o acc)) 
      (if (empty lst) (list (rev acc)) 
         (caris lst '@) (cons (rev acc) (split@ (cdr lst)))
         (split@ (cdr lst) (cons (car lst) acc))))

  (def span_let (lst)
     (if (empty lst) ()
       (is (caar lst) 'let) 
             (list (append (car lst)
                           (span_let (cdr lst))))   
             (cons (car lst) (span_let (cdr lst))) ))

   (mac scope lst (cons 'do (span_let (split@ lst))))
But it will have a way of holding a list of binding functions and macros like let to make it more flexible. It will support scope inside scope.