Apply attribute 3 as argument to a function and return a new tuple with the substituted argument.
482701
public final <U3> Tuple3<T1, T2, U3> map3(Function<? super T3, ? extends U3> function) {
        return Tuple.tuple(v1, v2, function.apply(v3));
    }
555368
def apply(self, func, *extras):
        
        return self.__class__({key: func(value, *extras)
                               for key, value in self.items()})
560261
public static <A> Tuple3<A, A, A> fill(A a) {
        return tuple(a, a, a);
    }
297680
public final <U3> Tuple4<T1, T2, U3, T4> map3(Function<? super T3, ? extends U3> function) {
        return Tuple.tuple(v1, v2, function.apply(v3), v4);
    }
1240784
def Then4(self, f, arg1, arg2, arg3, *args, **kwargs):
        
        args = (arg1, arg2, arg3) + args
        return self.ThenAt(4, f, *args, **kwargs)
326890
function liftA3(fn, x, y, z) {
  if(!isFunction(fn)) {
    throw new TypeError('liftA3: Function required for first argument')
  }
  else if(!((isApply(x) || isArray(x)) && isSameType(x, y) && isSameType(x, z))) {
    throw new TypeError('liftA3: Applys of same type required for last three arguments')
  }

  if(isArray(x)) {
    return ap(z, ap(y, map(fn, x)))
  }

  return x.map(fn).ap(y).ap(z)
}
553522
def _combine_attribute(attr_1, attr_2, len_1, len_2):
        
        if isinstance(attr_1, list) or isinstance(attr_2, list):
            attribute = np.concatenate((attr_1, attr_2), axis=0)
            attribute_changes = True
        else:
            if isinstance(attr_1, list) and isinstance(attr_2, list) and np.allclose(attr_1, attr_2):
                attribute = attr_1
                attribute_changes = False
            else:
                attribute = [attr_1.copy()] * len_1 if type(attr_1) != list else attr_1.copy()
                attribute.extend([attr_2.copy()] * len_2 if type(attr_2 != list) else attr_2.copy())
                attribute_changes = True
        return attribute, attribute_changes
846934
def _arg(__decorated__, **Config):
  
  """
  if isinstance(__decorated__, tuple):  # this decorator is followed by another arg decorator
    __decorated__[1].insert(0, Config)
    return __decorated__

  else:
    return __decorated__, [Config]
1324057
public final <U2> Tuple4<T1, U2, T3, T4> map2(Function<? super T2, ? extends U2> function) {
        return Tuple.tuple(v1, function.apply(v2), v3, v4);
    }
964512
def _apply_to_data(data, func, unpack_dict=False):
    
    apply_ = partial(_apply_to_data, func=func, unpack_dict=unpack_dict)

    if isinstance(data, dict):
        if unpack_dict:
            return [apply_(v) for v in data.values()]
        return {k: apply_(v) for k, v in data.items()}

    if isinstance(data, (list, tuple)):
        try:
            # e.g.list/tuple of arrays
            return [apply_(x) for x in data]
        except TypeError:
            return func(data)

    return func(data)
410398
def Then3(self, f, arg1, arg2, *args, **kwargs):
        
        args = (arg1, arg2) + args
        return self.ThenAt(3, f, *args, **kwargs)
1130541
def p_param_substitution(self, p):
        ''
        p[0] = (p[1], p[3])
        p.set_lineno(0, p.lineno(1))
1171986
def add_function_attribute(self, attr):
        
        if not self.is_function:
            raise ValueError('expected function value, got %s' % (self._kind,))
        attrname = str(attr)
        attrval = ffi.lib.LLVMPY_GetEnumAttributeKindForName(
            _encode_string(attrname), len(attrname))
        if attrval == 0:
            raise ValueError('no such attribute {!r}'.format(attrname))
        ffi.lib.LLVMPY_AddFunctionAttr(self, attrval)
1153796
def _apply_to_sets(self, func, operation, keys, *args):
        """"""
        keys = self._list_or_args(keys, args)
        if not keys:
            raise TypeError("{} takes at least two arguments".format(operation.lower()))
        left = self._get_set(keys[0], operation) or set()
        for key in keys[1:]:
            right = self._get_set(key, operation) or set()
            left = func(left, right)
        return left
735759
function () {
	var len, attr, g, args;

	args = arguments;

	len = args.length;

	if (len === 0) {
		g = noop;
	}
	else if (len === 1) {
		attr = args[0];

		g = function (obj) {
			return obj[attr];
		};
	}
	else {
		g = function (obj) {
			var i, tuple;

			tuple = [];

			for (i = 0; i < len; ++i) {
				tuple.push(obj[args[i]]);
			}

			return tuple;
		};
	}



	return g;
}
1239127
def _wrap_set_op(self, fun, arg):
        """"""
        result = fun(self, arg)
        result._autostep = self._autostep
        result.padding = self.padding
        return result
64506
def _rapply(d, func, *args, **kwargs):
    """"""
    if isinstance(d, (tuple, list)):
        return [_rapply(each, func, *args, **kwargs) for each in d]
    if isinstance(d, dict):
        return {
            key: _rapply(value, func, *args, **kwargs) for key, value in iteritems(d)
        }
    else:
        return func(d, *args, **kwargs)