PURE_IMPORTS_START _reduce PURE_IMPORTS_END
776654
function max(comparer) {
    var max = (typeof comparer === 'function')
        ? function (x, y) { return comparer(x, y) > 0 ? x : y; }
        : function (x, y) { return x > y ? x : y; };
    return Object(_reduce__WEBPACK_IMPORTED_MODULE_0__["reduce"])(max);
}
1053687
function reduce(arr, iter, base) {
    arr = Immutable.Iterable.isIterable(arr)? arr : Immutable.List(arr);

    return arr.reduce(function(prev, elem, key) {
        return prev
        .then(function(val) {
            return iter(val, elem, key);
        });
    }, Q(base));
}
845467
function() {
        if (!this.import) {
            this._findHost = function findHostShim() {
              var current = this;
              var app;
              do {
                app = current.app || app;
              } while (current.parent.parent && (current = current.parent));
              return app;
            };
            this.import = function importShim(asset, options) {
              var app = this._findHost();
              app.import(asset, options);
            };
        }
    }
492123
function importArgumentRelativeToSearchPaths(importer, importArgument, searchPaths) {
  var importAbsolutePath = path.resolve(path.dirname(importer), importArgument);
  var importSearchPath = _.find(searchPaths, function (path) {
    return importAbsolutePath.indexOf(path) === 0;
  });
  if (importSearchPath) {
    return path.relative(importSearchPath, importAbsolutePath);
  }
}
178373
function reducer(individualSeries, initialFunction, reductionFunction) {
                        if (individualSeries.length == 0) {
                            return NaN;
                        }
                        var initial = initialFunction(individualSeries[0][1]);
                        var i=1;
                        for (; initial==null && i<individualSeries.length; i++) {
                            initial = initialFunction(individualSeries[i][1]);
                        }
                        for (; i<individualSeries.length; i++) {
                            if (individualSeries[i][1] != null) {
                                initial = reductionFunction(initial, individualSeries[i][1]);
                            }
                        }
                        return initial;
                    }
1336274
private static Object reduceMethod(Context cx, int id, Scriptable scope,
                                       Scriptable thisObj, Object[] args)
    {
        Scriptable o = ScriptRuntime.toObject(cx, scope, thisObj);

        long length = getLengthProperty(cx, o, false);
        Object callbackArg = args.length > 0 ? args[0] : Undefined.instance;
        if (callbackArg == null || !(callbackArg instanceof Function)) {
            throw ScriptRuntime.notFunctionError(callbackArg);
        }
        Function f = (Function) callbackArg;
        Scriptable parent = ScriptableObject.getTopLevelScope(f);
        // hack to serve both reduce and reduceRight with the same loop
        boolean movingLeft = id == Id_reduce;
        Object value = args.length > 1 ? args[1] : Scriptable.NOT_FOUND;
        for (long i = 0; i < length; i++) {
            long index = movingLeft ? i : (length - 1 - i);
            Object elem = getRawElem(o, index);
            if (elem == Scriptable.NOT_FOUND) {
                continue;
            }
            if (value == Scriptable.NOT_FOUND) {
                // no initial value passed, use first element found as inital value
                value = elem;
            } else {
                Object[] innerArgs = { value, elem, index, o };
                value = f.call(cx, parent, parent, innerArgs);
            }
        }
        if (value == Scriptable.NOT_FOUND) {
            // reproduce spidermonkey error message
            throw ScriptRuntime.typeError0("msg.empty.array.reduce");
        }
        return value;
    }
234248
protected function reduce()
    {
        /** @noinspection PhpUndefinedMethodInspection */
        $gcd = $this->gcd($this->value['num']->get(), $this->value['den']->get());
        if ($gcd > 1) {
            $this->value['num']->set($this->value['num']->get() / $gcd) ;
            $this->value['den']->set($this->value['den']->get() / $gcd);
        }
    }
640507
def module_start_end(has_module, module_name)
      module_start = ''
      module_end = ''
      if has_module
        module_start = "module #{module_name}"
        module_end = 'end'
      end
      [module_start, module_end]
    end
530004
function isImported(source, classifiedName, importPath) {
    const allNodes = getSourceNodes(source);
    const matchingNodes = allNodes
        .filter(node => node.kind === ts.SyntaxKind.ImportDeclaration)
        .filter((imp) => imp.moduleSpecifier.kind === ts.SyntaxKind.StringLiteral)
        .filter((imp) => {
        return imp.moduleSpecifier.text === importPath;
    })
        .filter((imp) => {
        if (!imp.importClause) {
            return false;
        }
        const nodes = findNodes(imp.importClause, ts.SyntaxKind.ImportSpecifier).filter(n => n.getText() === classifiedName);
        return nodes.length > 0;
    });
    return matchingNodes.length > 0;
}
315470
function imports($imported_classes = []) {
    $imports = [];

    if ($imported_classes) {
      // Sort the imported classes.
      sort($imported_classes);

      foreach ($imported_classes as $fully_qualified_class_name) {
        $fully_qualified_class_name = ltrim($fully_qualified_class_name, '\\');
        $imports[] = "use $fully_qualified_class_name;";
      }

      $imports[] = '';
    }

    return $imports;
  }
885324
def reduce_int
      reduce = Risc.slot_to_reg( "int -> fix" , self , Parfait::Integer.integer_index , self)
      builder.add_code(reduce) if builder
      reduce
    end
650426
function reduce(fn, start) {
  assert.equal(typeof fn, 'function')
  return function(val) {
    val = Array.isArray(val) ? val : [val]

    const length = val.length;

    if (length === 0) {
      return Promise.resolve(start);
    }

    return val.reduce(function (promise, curr, index, arr) {
      return promise.then(function (prev) {
        if (prev === undefined && length === 1) {
          return curr;
        }

        return fn(prev, curr, index, arr)
      })
    }, Promise.resolve(start))
  }
}
767085
function stringReduce (string, reducerCallback, initialValue) {
  if (string.length === 0) {
    assertErr(initialValue, TypeError, 'Reduce of empty string with no initial value')
    return initialValue
  }
  var initialValuePassed = arguments.length === 3
  var result
  var startIndex
  if (initialValuePassed) {
    // initial value, initialize reduce state
    result = initialValue
    startIndex = 0
  } else {
    // no initial value
    if (string.length === 1) {
      return string.charAt(0)
    }
    // no initial value, initialize reduce state
    result = string.charAt(0)
    startIndex = 1
  }
  for (var i = startIndex; i < string.length; i++) {
    result = reducerCallback(result, string.charAt(i), i, string)
  }
  return result
}
1188964
function clearImports(partials) {
        for (var partialName in partials) {
            var _imports = partials[partialName].imports;

            for (var index in _imports) {
                var _partialToRemove = _imports[index];
                var i = 0;
                // remove file from list
                delete mainPartialList[_partialToRemove];
            } // end in imports
        }// end in files
    }
991397
private boolean reducing() {
        if (this.limits.reduceRedundant == 0) { this.limits.reduceRedundant = this.config.redinit; }
        long limit = this.limits.reduceRedundant;
        limit += this.limits.reduceForcing;
        limit += this.limits.reduceImportant;
        return limit <= this.stats.clausesRedundant;
    }
1348513
function (path, currentFileInfo, importOptions, callback) {
            var parserImports = this;
            this.queue.push(path);

            var fileParsedFunc = function (e, root, fullPath) {
                parserImports.queue.splice(parserImports.queue.indexOf(path), 1); // Remove the path from the queue

                var importedPreviously = fullPath in parserImports.files || fullPath === rootFilename;

                parserImports.files[fullPath] = root;                        // Store the root

                if (e && !parserImports.error) { parserImports.error = e; }

                callback(e, root, importedPreviously, fullPath);
            };

            if (less.Parser.importer) {
                less.Parser.importer(path, currentFileInfo, fileParsedFunc, env);
            } else {
                less.Parser.fileLoader(path, currentFileInfo, function(e, contents, fullPath, newFileInfo) {
                    if (e) {fileParsedFunc(e); return;}

                    var newEnv = new tree.parseEnv(env);

                    newEnv.currentFileInfo = newFileInfo;
                    newEnv.processImports = false;
                    newEnv.contents[fullPath] = contents;

                    if (currentFileInfo.reference || importOptions.reference) {
                        newFileInfo.reference = true;
                    }

                    if (importOptions.inline) {
                        fileParsedFunc(null, contents, fullPath);
                    } else {
                        new(less.Parser)(newEnv).parse(contents, function (e, root) {
                            fileParsedFunc(e, root, fullPath);
                        });
                    }
                }, env);
            }
        }
267332
void recomposeImports()
  {

    m_importNumber = getStylesheetRoot().getImportNumber(this);

    StylesheetRoot root = getStylesheetRoot();
    int globalImportCount = root.getGlobalImportCount();

    m_importCountComposed = (globalImportCount - m_importNumber) - 1;
    
    // Now get the count of composed imports from this stylesheet's imports
    int count = getImportCount();
    if ( count > 0)
    {
      m_endImportCountComposed += count;
      while (count > 0)
        m_endImportCountComposed += this.getImport(--count).getEndImportCountComposed();
    }
    
    // Now get the count of composed imports from this stylesheet's
    // composed includes.
    count = getIncludeCountComposed();
    while (count>0)
    {
      int imports = getIncludeComposed(--count).getImportCount();
      m_endImportCountComposed += imports;
      while (imports > 0)
        m_endImportCountComposed +=getIncludeComposed(count).getImport(--imports).getEndImportCountComposed();
     
    }                                                            
  }