protected final function getFunction($id, O\Expression $expression)
{
if ($expression instanceof O\ClosureExpression) {
return new Functions\ClosureExpressionFunction($this->getId($id), $expression, $this->evaluationContext);
} else {
return new Functions\CallableFunction($this->getId($id), $expression->evaluate($this->evaluationContext));
}
}