Arc Forumnew | comments | leaders | submitlogin
3 points by silence 5741 days ago | link | parent

Thanks for that reference.

Check is currently defined like this:

  (mac check (x test (o alt))
    (w/uniq gx
      `(let ,gx ,x
         (if (,test ,gx) ,gx ,alt))))
Can the order of evaluation problem be corrected by changing the check macro to the following?

  (mac check (test x (o alt))
    (w/uniq gx
      `(let ,gx nil
          (if (,test (= ,gx ,x)) ,gx ,alt))))


3 points by skenney26 5741 days ago | link

Interesting twist. I don't immediately see any issues with doing it that way (other than making the definition slightly longer).

-----