Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Macro problem #21

Open
soegaard opened this issue Jan 16, 2020 · 0 comments
Open

Macro problem #21

soegaard opened this issue Jan 16, 2020 · 0 comments

Comments

@soegaard
Copy link
Owner

This works

     (define (array-intersection ars)
       ; copy first array
       (var [result ((dot (ref ars 0) slice))])
       ; intersect the remaining arrays with the result array
       (for ([a in-array ars]
             [j in-naturals 0]) ; (sigh) don't use i here
         (when (> j 0)
           (:= result (string-array-intersection2 result a))))
       result)

But if j is replaced with i the macro expansion is wrong.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant