Hi Christian,
Thank you for the explanation. I interpreted what would happen obviously in a wrong way. But since I have a working solution I'll use that one.
Rob.
-----Oorspronkelijk bericht----- Van: Christian Grün [mailto:christian.gruen@gmail.com] Verzonden: zondag 5 februari 2017 18:26 Aan: Rob Stapper CC: BaseX Onderwerp: Re: [basex-talk] Improper use? Potential bug?
Hi Rob,
Your queries are not equivalent. The hof:id function simply returns its argument (see [1]). In your example, it returns a function with two arguments ($v1,$2v), which is then passed on to local:exists and bound to $exec. Later on, $exec is evaluated with a single argument, so this cannot work out (see the error message "1 argument supplied, 2 expected: $exec").
Christian
[1] http://docs.basex.org/wiki/Higher-Order_Functions_Module#hof:id
On Sun, Feb 5, 2017 at 4:26 PM, Rob Stapper r.stapper@lijbrandt.nl wrote:
a) I've reduced it to its essence. b) I would expect both versions behave the same. Thus: ( 1,2) as result
-----Oorspronkelijk bericht----- Van: Christian Grün [mailto:christian.gruen@gmail.com] Verzonden: zondag 5 februari 2017 14:57 Aan: Rob Stapper CC: BaseX Onderwerp: Re: [basex-talk] Improper use? Potential bug?
Shouldn't this work?
I don’t think so. What result would you expect?
Your query does quite a lot, and I can only guess what you think of it. Please reduce it further and tell us a) what you think goes wrong and b) which result you would expect.
-----Oorspronkelijk bericht----- Van: Christian Grün [mailto:christian.gruen@gmail.com] Verzonden: zaterdag 4 februari 2017 11:14 Aan: Rob Stapper CC: BaseX Onderwerp: Re: [basex-talk] Improper use? Potential bug?
My program is heavily recursive so it is hard to create a running snippet but I will try.
Hopefully in the mean time you can have a look at the error.
We definitely need some code to track this down. Thanks in advance.