<<
Compiling for-expressions
>>
FLWOR
expressions are hardest to optimize.
Treat
return
body as anonymous function, called as needed from
for
clause.
More general solution: compile
return
body to new
Consumer
class.
No attempt yet at join optimizations or using indexes.