A special version of map to get around the performance hit for creating closures as a form of currying
499034
function curryMap (args, f, arr) {
    var result = [], i, n;
    for (i = 0, n = arr.length; i < n; i++) {
      result.push(f(args, arr[i]));
    }
    return result;
  }
79857
def lazy_map(initial={}, pre_size=0):
    '''
    
    '''
    if is_lazy_map(initial): return initial
    if not initial: return _EMPTY_LMAP
    return _lazy_turbo_mapping(initial, pre_size)
288486
function nest(t, x, node, func, end) {
        x.stmtStack.push(node);
        var n = func(t, x);
        x.stmtStack.pop();
        end && t.mustMatch(end);
        return n;
    }
847748
function map(obj, func) {
    var index = -1;
    var res = [];
    for(var key in obj) { if(obj[key]) { res[++index] = func(obj[key], key, obj); } }
    return res;
}
81473
function S(fn, value) {
    var owner = Owner, clock = RunningClock === null ? RootClock : RunningClock, running = RunningNode;
    if (owner === null)
        console.warn("computations created without a root or parent will never be disposed");
    var node = new ComputationNode(clock, fn, value);
    Owner = RunningNode = node;
    if (RunningClock === null) {
        toplevelComputation(node);
    }
    else {
        node.value = node.fn(node.value);
    }
    if (owner && owner !== UNOWNED) {
        if (owner.owned === null)
            owner.owned = [node];
        else
            owner.owned.push(node);
    }
    Owner = owner;
    RunningNode = running;
    return function computation() {
        if (RunningNode !== null) {
            var rclock = RunningClock, sclock = node.clock;
            while (rclock.depth > sclock.depth + 1)
                rclock = rclock.parent;
            if (rclock === sclock || rclock.parent === sclock) {
                if (node.preclocks !== null) {
                    for (var i = 0; i < node.preclocks.count; i++) {
                        var preclock = node.preclocks.clocks[i];
                        updateClock(preclock);
                    }
                }
                if (node.age === node.clock.time()) {
                    if (node.state === RUNNING)
                        throw new Error("circular dependency");
                    else
                        updateNode(node); // checks for state === STALE internally, so don't need to check here
                }
                if (node.preclocks !== null) {
                    for (var i = 0; i < node.preclocks.count; i++) {
                        var preclock = node.preclocks.clocks[i];
                        if (rclock === sclock)
                            logNodePreClock(preclock, RunningNode);
                        else
                            logClockPreClock(preclock, rclock, RunningNode);
                    }
                }
            }
            else {
                if (rclock.depth > sclock.depth)
                    rclock = rclock.parent;
                while (sclock.depth > rclock.depth + 1)
                    sclock = sclock.parent;
                if (sclock.parent === rclock) {
                    logNodePreClock(sclock, RunningNode);
                }
                else {
                    if (sclock.depth > rclock.depth)
                        sclock = sclock.parent;
                    while (rclock.parent !== sclock.parent)
                        rclock = rclock.parent, sclock = sclock.parent;
                    logClockPreClock(sclock, rclock, RunningNode);
                }
                updateClock(sclock);
            }
            logComputationRead(node, RunningNode);
        }
        return node.value;
    };
}
1286420
function map ( input, inputMin, inputMax, outputMin, outputMax, clamp, ease ) {
    input = ( input - inputMin ) / ( inputMax - inputMin );
    if ( ease ) {
        input = ease(input);
    } 
    var output = input * ( outputMax - outputMin ) + outputMin;
    if ( !!clamp ) {
        if ( outputMax < outputMin ) {
            if ( output < outputMax ) {
                output = outputMax;
            }
            else if ( output > outputMin ) {
                output = outputMin;
            }
        } else {
            if ( output > outputMax ) {
                output = outputMax;
            }
            else if ( output < outputMin ) {
                output = outputMin;
            }
        }
    }
    return output;
}
595398
function _curriedr (f, xs) {
    let t = typeOf(f);
    if (t === 'Function') {
        return f.length <= 1 ? f : arity(f.length - xs.length, (...ys) => {
            let a = [...xs, ...ys].filter(v => v !== void 0);
            if (a.length >= f.length) { return f(...a.reverse()); }
            return _curriedr(f, a);
        });
    }
    throw `curryRight :: Expected argument to be of type function but saw ${t}`;
}
1260441
function _curried (f, xs) {
    let t = typeOf(f);
    if (t === 'Function') {
        return f.length <= 1 ? f : arity(f.length - xs.length, (...ys) => {
            let a = [...xs, ...ys].filter(v => v !== void 0);
            if (a.length >= f.length) { return f(...a); }
            return _curried(f, a);
        });
    }
    throw `curry :: Expected argument to be of type function but saw ${t}`;
}
769012
function curry(fn) {
  return function(...xs) {
    const args =
      xs.length ? xs : [ undefined ]

    if(args.length < fn.length) {
      return curry(Function.bind.apply(fn, [ null ].concat(args)))
    }

    const val = args.length === fn.length
      ? fn.apply(null, args)
      : args.reduce(applyCurry, fn)

    if(isFunction(val)) {
      return curry(val)
    }

    return val
  }
}
1321522
function runningMap(a, fn, init) {
  return a.map(v => init = fn(v, init));
}
558902
def auto_curry(name, &block)
      arity = instance_method(name).arity

      return unless public_instance_methods.include?(name) && arity != 0

      mod = Module.new

      mod.module_eval do
        define_method(name) do |*args, &mblock|
          response =
            if arity < 0 || arity == args.size
              super(*args, &mblock)
            else
              self.class.curried.new(self, view: name, curry_args: args, arity: arity)
            end

          if block
            response.instance_exec(&block)
          else
            response
          end
        end
      end

      auto_curried_methods << name

      prepend(mod)
    end
980400
function bind(f) {
    function curriedBind(o) {
        /* If native bind doesn't exist, use a polyfill. */
        var args = [].slice.call(arguments, 1),
            g;

        if(f.bind) g = f.bind.apply(f, [o].concat(args));
        else {
            g = function() {
                return f.apply(o, args.concat(rest(arguments)));
            };
        }

        /*
           Let's try and associate all curried functions with the same name as the originator.
           Can't override length but can set _length for currying
        */
        g._name = functionName(f);
        g._length = Math.max(functionLength(f) - args.length, 0);

        return g;
    }

    /* Manual currying since `curry` relies in bind. */
    if(arguments.length > 1) return curriedBind.apply(this, [].slice.call(arguments, 1));
    else return curriedBind;
}
959168
function map(fn, ctx) {
  assert.equal(typeof fn, 'function')
  return function(val) {
    val = Array.isArray(val) ? val : [val]
    return Promise.all(val.map(fn, ctx))
  }
}
207753
def recursive_map(func, data):
    
    def recurse(item):
        return recursive_map(func, item)
    items_mapped = map_collection(recurse, data)
    return func(items_mapped)
1362095
def flat_map_t(func):
    
    return Transformation(
        'flat_map({0})'.format(name(func)),
        partial(flat_map_impl, func),
        {ExecutionStrategies.PARALLEL}
    )
847270
function vectorize(fun) {
  return function(x) {
    if (!isArray(x)) {
      return fun(x);
    }
    return x.map(function(x) {
      return fun(x);
    });
  };
}
78399
function wrapMutatingArrayMethod(method, func) {
      return function() {
        var result = [][method].apply(obj, arguments);
        this.len = this.values.length;
        cache = {};
        children = {};
        func.apply(this, arguments);
        target.parent.trigger('update', target.prop);
        return result;
      };
    }