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

  arc> (inl 1 (list 1 2 3))
  t
I wouldn't rely on that:

  arc> (inl list (list 1 2 3))
  t
  arc> (let x list
         (prn list)
         (inl list (list 1 2 3 4)))
  #<procedure: list>
  t
So you're actually searching a list that includes the function list.

"..you don't want to pass a quoted list into a macro, but unquoted. This is the way most macros are used, but I hesitate to make it a global rule."

The rule is, the arg is eval'd if it's eval'd in the expansion. (Since macros don't eval args, they eval the return value.)

  (mac foo (x) (cons 3 ,x))  ; will eval x
  (mac bar (x) (cons 3 ',x))  ; won't eval x