declare function local:add($x){
$x+1
};
let $b:=local:add
return $b(4)

Produces
 [XPTY0004] Variable(...): no empty sequence allowed.

Have I got the syntax wrong, or is this a bug?

/Andy