Hi Marco,
According to the documentation [2] it should behave like a sort of "do code until condition" and I'd expect it to return 1 but I get 0 instead thus it rather seems like a "until condition do code".
The best wording is probably subject to discussion. Indeed the execution will stopped if the predicate function yields true, and (as you say) the first check occurs before the first execution [1]. I’ll be happy to rewrite the documentation (or I’ll even be happier if someone else wants to do it ;).
Cheers, Christian
[1] https://github.com/BaseXdb/basex/blob/master/basex-core/src/main/java/org/ba...