Arc Forumnew | comments | leaders | submitlogin
1 point by akkartik 4671 days ago | link | parent

On a tangent, I have somehow never come across protect before. How is it different from after?


3 points by dido 4671 days ago | link

after is a macro that is defined in terms of protect. Protect is the primitive form. Arc 3.1 defines after as:

    (mac after (x . ys)
      `(protect (fn () ,x) (fn () ,@ys)))
after is just syntactic sugar for protect.

-----