Dear BaseX people,

I encounter a problem with standard function fn:apply(), applied to an updating function.

declare %updating function f:apply-dbPut($db as xs:string, $input as item(), $path as xs:string) {
     let $fn := function-lookup(QName('http://basex.org/modules/db', 'put'), 3)
     let $args := [$db, $input, $path]
     return apply($fn, $args)
};

Message:
[XUST0002] Function body must be updating.

Therer seems to be a checking looking for an updating function, and apply() cannot, of course, be classified as such.

Do I make a mistake, or is it a limitation, or a bug?

Thank you for checking, kind regards -
Hans-Jürgen