FunctionCallContext recEnv = new FunctionCallContext(dynEnv);
for(int i = 0; i < paramArity; i++) {
ParametricVariable paramVar = params.get(i);
XQExpression argExpr = _params.get(i);
paramVar.setValue(argExpr); // for the static analzing
Sequence argValue = argExpr.eval(contextSeq, dynEnv);
paramVar.allocateResult(argValue, recEnv);
}
XQExpression body = udf.getBodyExpression();
// lazy function may not be analyzed TODO REVIEWME
XQExpression analyzed = body.staticAnalysis(dynEnv.getStaticContext());