Re: [basex-talk] tail recursion not happening?

2021-09-27 Thread Graydon
On Mon, Sep 27, 2021 at 06:13:49PM +0200, Christian Grün scripsit: > No problem, Graydon, thanks for the clarification! You're welcome! Thank you for your prompt and useful feedback! > You might need to rewrite your code as it’s not tail recursive (see > [1] for some examples; you could also try

Re: [basex-talk] tail recursion not happening?

2021-09-27 Thread Christian Grün
No problem, Graydon, thanks for the clarification! You might need to rewrite your code as it’s not tail recursive (see [1] for some examples; you could also try your luck with fold-left). If you want to go the easy path, you can also increase the Java stack size when starting BaseX (by adding -Xss

Re: [basex-talk] tail recursion not happening?

2021-09-27 Thread Graydon
Hi Christian -- On Mon, Sep 27, 2021 at 05:53:24PM +0200, Christian Grün scripsit: > To understand you correctly: You indicated that you only observed the > initial error if the code was moved into a module. That is factual, but it's an artifact of poor testing on my part. I had tested the funct

Re: [basex-talk] tail recursion not happening?

2021-09-27 Thread Christian Grün
Hi Graydon, To understand you correctly: You indicated that you only observed the initial error if the code was moved into a module. Did I get this right? If not, what did you mean by »Stick the functions in a module namespace«? Thanks again, Christian On Mon, Sep 27, 2021 at 3:20 PM Graydon

Re: [basex-talk] tail recursion not happening?

2021-09-27 Thread Graydon
Hi Christian -- Apologies; I was hoping there was something in the structure of the function that was obviously daft by inspection. On Mon, Sep 27, 2021 at 09:15:56AM +0200, Christian Grün scripsit: > Sorry, I’m lazy. Could you share some minimized code with us that > triggers the error? For cer

Re: [basex-talk] tail recursion not happening?

2021-09-27 Thread Christian Grün
Hi Graydon, Sorry, I’m lazy. Could you share some minimized code with us that triggers the error? Thanks in advance, Christian On Sat, Sep 25, 2021 at 11:13 PM Graydon Saunders wrote: > > Hello -- > > Using BaseX 9.6.1 on Linux. > > So I'm trying to convert a compact-ish element pattern string