Arc Forumnew | comments | leaders | submitlogin
3 points by almkglor 6072 days ago | link | parent

For threads: Anarki has thread-local variables:

  (= call-stack* (thread-local))
  (= (call-stack*) (list))

  (let old-fn fn
    (mac fn (args . body)
      (w/uniq (name ret)
        `(,old-fn ,args
            (push (list ,name ,body) (call-stack*))
             (let ,ret (do ,@body)
              (pop  (call-stack*))
               ,ret)))))
Note the extra layer of parenthesization.