Arc Forumnew | comments | leaders | submitlogin
2 points by almkglor 6121 days ago | link | parent

Not yet, although I'm working on it. The main problem is that currently, destructuring splits on the (car ...) and (cdr ...) of each list node in the pattern, something like this:

  ;a is the variable that contains the current list node of the function input
  ;p is the pattern
  `(and (acons ,a)
        ; this creates the test
        (let ,a (car ,a) ,(self a (car p)))
        (let ,a (cdr ,a) ,(self a (cdr p))))
Obviously, I'll need to resequence them - the cdr branch has to be physically located within the car branch, so that I can capture any variables in the created guards.