Attach a transform function to math.map
Adds a property transform containing the transform function.

This transform creates a one-based index instead of a zero-based index
163733
function mapTransform (args, math, scope) {
    let x, callback

    if (args[0]) {
      x = args[0].compile().evaluate(scope)
    }

    if (args[1]) {
      if (isSymbolNode(args[1]) || isFunctionAssignmentNode(args[1])) {
        // a function pointer, like filter([3, -2, 5], myTestFunction)
        callback = args[1].compile().evaluate(scope)
      } else {
        // an expression like filter([3, -2, 5], x > 0)
        callback = compileInlineExpression(args[1], math, scope)
      }
    }

    return map(x, callback)
  }
1344424
function through(transform) {
  var th = new Transform({objectMode: true})

  th._transform = transform

  return th
}
1336434
function (object) {
            object.id = object.id || this.generateId();
            this.data.push(object);
            this.mapValues[object.id] = {};
            this.eachMap(function (map, mapName) {
                this.addObjectToMap(mapName, object);
            });
            return this;
        }
745459
function(index) {
      index = Math.min(index, this.length);
      arguments.length > 1
      && this.splice.apply(this, [index, 0].concat([].pop.call(arguments)))
      && this.insert.apply(this, arguments);
      return this;
    }
837111
function (featureCollection, indexKey) {
		var features = featureCollection.features;
		var feature;
		var properties;
		var featureIndex = {};
		var value;

		for (var index = 0; index < features.length; ++index) {
			feature = features[index];

			properties = feature.properties;

			value = properties[indexKey];

			// If the value already exists in the index, then either create a GeometryCollection or append the
			// feature's geometry to the existing GeometryCollection
			if (value in featureIndex) {
				var existingFeature = featureIndex[value];

				if (existingFeature.geometry.type !== 'GeometryCollection') {
					featureIndex[value] = {
						type: 'Feature',
						geometry: {
							type: 'GeometryCollection',
							geometries: [feature.geometry, existingFeature.geometry]
						}
					};
				}
				else {
					existingFeature.geometry.geometries.push(feature.geometry);
				}
			}
			else {
				featureIndex[value] = feature;
			}
		}

		return featureIndex;
	}
831632
function _$add(prop, value, lazyEmit) {
        if (prop.match(/[\.\[\]]/)) {
            throw new Error('Propname shoudn\'t contains "." or "[" or "]"')
        }

        if ($indexOf(_observableKeys, prop)) {
            // If value is specified, reset value
            return arguments.length > 1 ? true : false
        }
        _props[prop] = _walk(prop, $util.copyValue(value))
        _observableKeys.push(prop)
        $util.def(model, prop, {
            enumerable: true,
            get: function() {
                return _props[prop]
            },
            set: function (v) {
                _$set(prop, v)
            }
        })
        // add peroperty will trigger change event
        if (!lazyEmit) {
            _emitChange(prop, value)
        } else {
            return {
                kp: prop,
                vl: value
            }
        }
    }
1129352
def transform(func, data):
    
    out = []
    for r in data:
        out.append(func(r))
    return out
1051267
function transform ( p, fn ) {
				return function () {
					var result = p();

					return result === null ? null : fn( result );
				};
			}
528427
private void addValue(Object chartSerie, Number x, String lastXValue, Number y, HashMap<String, String> formatValues, int chartsNo) {			
		if (chart.getType().isLine()) {					
		   ((XYSeries)chartSerie).add(x, y);
		} else if (isLineCombo) {			
			lineBarDataset.addValue(y, (String)chartSerie, lastXValue);
		} else if (!chart.getType().isPie()) {
						
			GFunction function = FunctionFactory.getFunction(chart.getYFunction());
			if (!AbstractGFunction.NOOP.equals(function.getName()) || (chartsNo > 1)) {
				barDataset.setValue(y, (String)chartSerie, lastXValue);
			} else {			
				int serie = 0;
				Integer i = xValueSerie.get(lastXValue);
				if (i != null) {
					serie = i+1;
					xValueSerie.put(lastXValue, serie);
					barDataset.setValue(y, (String)chartSerie, lastXValue + " (" + serie + ")");		
				} else {
					barDataset.setValue(y, (String)chartSerie, lastXValue);
					xValueSerie.put(lastXValue, 0);
				}	
			}
			
		} else if (chart.getType().isPie()) {
			if (AbstractGFunction.NOOP.equals(chart.getYFunction())) {
				int serie = 0;
				Integer i = xValueSerie.get(lastXValue);
				if (i != null) {
					serie = i+1;
					xValueSerie.put(lastXValue, serie);
					pieDataset.setValue(lastXValue + " (" + serie + ")", y);					
				} else {
					pieDataset.setValue(lastXValue, y);
					xValueSerie.put(lastXValue, 0);
				}				
			} else {
				pieDataset.setValue(lastXValue, y);
			}
		}
		formatValues.put(x.toString(), lastXValue);
	}
654710
function (hash, val) {
            var key,
              value,
              element = this.element,
              hasSetSymbolSize,
              ret = this,
              skipAttr;

            // single key-value pair
            if (typeof hash === 'string' && val !== UNDEFINED) {
                key = hash;
                hash = {};
                hash[key] = val;
            }

            // used as a getter: first argument is a string, second is undefined
            if (typeof hash === 'string') {
                ret = (this[hash + 'Getter'] || this._defaultGetter).call(this, hash, element);

                // setter
            } else {

                for (key in hash) {
                    value = hash[key];
                    skipAttr = false;



                    if (this.symbolName && /^(x|y|width|height|r|start|end|innerR|anchorX|anchorY)/.test(key)) {
                        if (!hasSetSymbolSize) {
                            this.symbolAttr(hash);
                            hasSetSymbolSize = true;
                        }
                        skipAttr = true;
                    }

                    if (this.rotation && (key === 'x' || key === 'y')) {
                        this.doTransform = true;
                    }

                    if (!skipAttr) {
                        (this[key + 'Setter'] || this._defaultSetter).call(this, value, key, element);
                    }

                    // Let the shadow follow the main element
                    if (this.shadows && /^(width|height|visibility|x|y|d|transform|cx|cy|r)$/.test(key)) {
                        this.updateShadows(key, value);
                    }
                }

                // Update transform. Do this outside the loop to prevent redundant updating for batch setting
                // of attributes.
                if (this.doTransform) {
                    this.updateTransform();
                    this.doTransform = false;
                }

            }

            return ret;
        }
1306758
function(value, attr, fn, model, computed, indices) {
        return fn.call(this, value, attr, model, computed, indices);
      }
676191
def add_map(self, event, handle, *args):
        

        item = self.base.setdefault(event, list())
        item.append((handle, args))
566833
function parseTransforms(value) {
  return value
    .match(/(rotate|translate|scale|skewX|skewY|matrix)\s*\(([^)]*)\)\s*/g)
    .map(transform => transform.match(/[\w.-]+/g));
}
849753
function retransformValueAST(root, customProperties, withoutProperty) {
	const nextCustomProperties = Object.assign({}, customProperties);

	delete nextCustomProperties[withoutProperty];

	return transformValueAST(root, nextCustomProperties);
}
138897
function map(f, a)
{
	var newA = {
		ctor: '_Array',
		height: a.height,
		table: new Array(a.table.length)
	};
	if (a.height > 0)
	{
		newA.lengths = a.lengths;
	}
	for (var i = 0; i < a.table.length; i++)
	{
		newA.table[i] =
			a.height === 0
				? f(a.table[i])
				: map(f, a.table[i]);
	}
	return newA;
}
1295597
def transform(self, data):
        
        out = {}
        for key, val in data.items():
            if key in self._transform_map:
                target = self._transform_map[key]
                key, val = target(key, val) if type(target) == types.FunctionType else (key, target)

            out[key] = val


        return out
822229
function add(changeList, property, index, values) {
        changeList.push({
            type:'add',
            path: property,
            index: index,
            vals: values
        })
    }