map to elementary values
12913
function mapToValues(v){
        function mapRec(e){
            if(!isAVector(e)) return e;
            return mapRec(e.get(0));
        }
        return v.map(mapRec);
    }
797446
function MAP(mMap, aParts) {
		var sKey, mResult = {};

		for (sKey in mMap) {
			mResult[sKey] = mMap[sKey](aParts); // evaluate value
		}
		return mResult;
	}
1020541
function mapValues (object, map) {
  return Object.keys(object).reduce((clone, key) =>
    Object.assign(clone, { [key]: map(object[key], key) }), {})
}
1193430
public Tuple mapValues(@NonNull Function<Object, ? extends Object> function) {
      return NTuple.of(Arrays.stream(array()).map(function).collect(Collectors.toList()));
   }
775994
function map( value, idx ) {
	value = parseFloat( value.toString() ) * idx;
	return value.toString();
}
353622
function(value) {
            	var V = value.elements || value;

            	if (this.elements.length != V.length) 
            	    return this.map(function(v) { return v + value });
            	else
            	    return this.map(function(x, i) { return x + V[i - 1]; });
                }
943650
private LinkedHashMap<String, Num> mapValues(String infix, Object... values) {
        LinkedHashMap<String, Num> vNames = null;
        int remain = 0;
      
        Matcher mat = pVariableNames.matcher(infix);
        while (mat.find()) {
            if (vNames == null)
                vNames = new LinkedHashMap<String, Num>();

            String vName = mat.group();
            if (!vNames.containsKey(vName)) {
                remain++;
                Num num = findValue(vName, true, values);
                vNames.put(vName, num);

                if (num != null)
                    remain--;
            }
        }

        // pair names with values without name
        if (vNames != null) {
            int lastPos = 0;
            for (Entry<String, Num> entry : vNames.entrySet()) {
                if (entry.getValue() == null) {
                    for (int i = lastPos; i < values.length; i++) {
                        Object v = values[i];
                        if (v != null) {
                            if (v instanceof Num) {
                                Num n = (Num) v;
                                if (n.getName() == null)
                                    entry.setValue(n);
                                else if (n.getName().equals(entry.getValue()))
                                    entry.setValue(n);
                            }
                            else
                                entry.setValue(Num.toNum(v));

                            values[i] = null;
                            lastPos = i;
                            remain--;
                        }
                    }
                }
            }
        }

        if (remain > 0 && vNames != null) {
            StringBuilder sb = new StringBuilder();
            int c = 0;
            for (Entry<String, Num> entry : vNames.entrySet()) {
                if (entry.getValue() == null) {
                    if (c++ > 0)
                        sb.append(", ");
                    sb.append(entry.getKey());
                }
            }

            throw new CalculatorException("Undefined values for expression (" + infix + ") variables: " + sb.toString());
        }

        return vNames;
    }
376789
def merge_keyvals_into_map(keyvals, amap):

    """"""

    for kv in keyvals:
        k,v = kv.split('=')
        if k in amap:
            logger.warn('overwriting {0} with {1}'.format(k, v))
        amap[k] = v
890904
Map convertToMap() {
        Map ret = new HashMap();
        for (Enumeration e = enumerateKeys(); e.hasMoreElements();) {
            Object key = e.nextElement();
            Object value = getValue(key);
            ret.put(key, value);
        }
        return ret;
    }
208776
@Override
  protected void remapData(int[][] mapping) throws IOException {
    super.remapData(mapping);
    T1[] originalBasicValueSumList = basicValueSumList.clone();
    long[] originalBasicValueNList = basicValueNList.clone();
    basicValueSumList = operations.createVector1(mapping.length);
    basicValueNList = new long[mapping.length];
    for (int i = 0; i < mapping.length; i++) {
      for (int j = 0; j < mapping[i].length; j++) {
        if (j == 0) {
          setValue(i, originalBasicValueSumList[mapping[i][j]],
              originalBasicValueNList[mapping[i][j]], false);
        } else {
          setValue(i, originalBasicValueSumList[mapping[i][j]],
              originalBasicValueNList[mapping[i][j]], true);
        }
      }
    }
    basicValueSumList = newBasicValueSumList;
    basicValueNList = newBasicValueNList;
  }
879926
function getMapData$1(map, key) {
  var data = map.__data__;
  return isKeyable(key) ? data[typeof key == 'string' ? 'string' : 'hash'] : data.map;
}
796429
def value_map(value)
      v = case value.class
      when Array
        value.join(',')
      when Range
        "#{value.first}-#{value.last}"
      when Hash
        if value.has_key?(:or)
          "|#{value[:or].join(',')}"
        elsif value.has_key?(:not)
          "~#{value[:not].join(',')}"
        end
      when TrueClass
        "Y" # TODO: figure out if this should be Y or Yes
      when FalseClass
        "N" # TODO: figure out if this should be N or No
      else
        value
      end
      v
    end
324458
function(value)
	{
		var keys = this.getKeys(value);
		var output = null;
		var i;
		var len = keys.length;

		// array
		if ( value instanceof Array )
			/*( 1 == len && '0' == keys[0] )
			||
			( len > 1 && this.reduceArray(keys, function(v,w){return Math.floor(v+w);}, 0) == len * (len - 1) / 2) )*/
		{
			output = [];
			for ( i = 0; i < len; i++ )
			{
				output.push(this.dump(value[keys[i]]));
			}

			return '['+output.join(', ')+']';
		}

		// mapping
		output = [];
		for ( i = 0; i < len; i++ )
		{
			output.push(this.dump(keys[i])+': '+this.dump(value[keys[i]]));
		}

		return '{ '+output.join(', ')+' }';
	}
612240
void mapInVal(Object val, Object to, String to_in) {
        if (val == null) {
            throw new ComponentException("Null value for " + name(to, to_in));
        }
        if (to == ca.getComponent()) {
            throw new ComponentException("field and component ar ethe same for mapping :" + to_in);
        }
        ComponentAccess ca_to = lookup(to);
        Access to_access = ca_to.input(to_in);
        checkFA(to_access, to, to_in);
        ca_to.setInput(to_in, new FieldValueAccess(to_access, val));
        if (log.isLoggable(Level.CONFIG)) {
            log.config(String.format("Value(%s) -> @In(%s)", val.toString(), to_access.toString()));
        }
    }
829972
function mapValues(obj, iteratee) {
  const result = {}
  for (const k in obj) {
    result[k] = iteratee(obj[k])
  }
  return result
}
1230146
def flat_map(iterable, func):
    """"""
    results = []
    for element in iterable:
        result = func(element)
        if len(result) > 0:
            results.extend(result)
    return results
168825
private Class mapPrimitive(Class clazz) {
		if (clazz == Integer.TYPE) {
			return Integer.class;
		}
		if (clazz == Double.TYPE) {
			return Double.class;
		}
		if (clazz == Float.TYPE) {
			return Float.class;
		}
		if (clazz == Boolean.TYPE) {
			return Boolean.class;
		}
		if (clazz == Long.TYPE) {
			return Long.class;
		}
		
		throw new RuntimeException("Unsupported primitive: "+clazz);
	}