ncsa / qdl

the QDL programming language
Other
1 stars 0 forks source link

Extend for_each to apply dyadic functions to all arguments #38

Closed jjg-123 closed 1 month ago

jjg-123 commented 7 months ago

Now for_each will only accept n arguments for an n-ary function. For dyads, it makes sense to apply it pairwise to each argument, so for_each(@+,x., y., z.) should just sum the elements, not restrict the arguments. This is because it requires quite a few hoops to apply a dyadic function to several arguments if you have to do it pairwise manually. Intuitively, one would expect dyadic functions to work on for_each,