async function evaluateUnary(expr, input, environment) {
        var result;

        switch (expr.value) {
            case '-':
                result = await evaluate(expr.expression, input, environment);
                if(typeof result === 'undefined') {
                    result = undefined;
                } else if (isNumeric(result)) {
                    result = -result;
                } else {
                    throw {
                        code: "D1002",
                        stack: (new Error()).stack,
                        position: expr.position,
                        token: expr.value,
                        value: result
                    };
                }
                break;
            case '[':
                // array constructor - evaluate each item
                result = [];
                let generators = await Promise.all(expr.expressions
                    .map(async (item, idx) => {
                        environment.isParallelCall = idx > 0
                        return [item, await evaluate(item, input, environment)]
                    }));
                for (let generator of generators) {
                    var [item, value] = generator;
                    if (typeof value !== 'undefined') {
                        if(item.value === '[') {
                            result.push(value);
                        } else {
                            result = fn.append(result, value);
                        }
                    }
                }
                if(expr.consarray) {
                    Object.defineProperty(result, 'cons', {
                        enumerable: false,
                        configurable: false,
                        value: true
                    });
                }
                break;
            case '{':
                // object constructor - apply grouping
                result = await evaluateGroupExpression(expr, input, environment);
                break;

        }
        return result;
    }
Evaluate unary expression against input data
@param {Object} expr - JSONata expression
@param {Object} input - Input data to evaluate against
@param {Object} environment - Environment
@returns {*} Evaluated input data