RumbleDB/rumble

JSONiq: Arrow doesn't work with inline functions

jsommr opened this issue · 3 comments

This doesn't work: "test" => function ($str) { "ok" }

Workaround:

declare function f($arrow-val, $fn)
{
  $fn($arrow-val)
};

"test" => f(function($str) { "ok" })

Thanks a lot, indeed I think it is only implemented for static calls for now. We will look into it.

Happy to announce that this is now supported in the master, and it will be part of the next release!

As a comment regarding the query in the original comment: please note that the syntax is like this:

"test" => (function ($str) { "ok" })()

i.e., the dynamic function must actually be called.