private function createMapFunction()
    {
        return new ExpressionFunction(
            'map',
            function ($elements, $expression) {
                throw new \Exception('Map function does not support compilation');
            },
            function (array $values, $elements, $expression) {
                if (empty($elements)) {
                    return [];
                }

                $result = [];

                foreach ($elements as $element) {
                    $result[] = $this->evaluate($expression, [
                        'el' => $element,
                    ]);
                }

                return $result;
            }
        );
    }