Arc Forumnew | comments | leaders | submitlogin
1 point by Adlai 5462 days ago | link | parent

AFAIK, the parameter list for fn doesn't do destructuring in Arc. I think it's an easy fix though -- does this work?

   (mac mappair (x y expr args)
     (w/uniq arg
       `(map (fn (,arg)
               (let ,x ,(car  ,arg)
                    ,y ,(cadr ,arg) )
                 ,expr) )
             (pair ,args) ) ) )


1 point by CatDancer 5462 days ago | link

AFAIK, the parameter list for fn doesn't do destructuring in Arc

  arc> ((fn ((x y)) (+ x y)) '(5 10))
  15

-----

1 point by Adlai 5462 days ago | link

My bad. I should start using the language a bit first...

-----