Top "Reduce" questions

Reduce refers to the second step in a MapReduce computation, a component of a larger scalable, parallel-izable algorithm.

Scala : fold vs foldLeft

I am trying to understand how fold and foldLeft and the respective reduce and reduceLeft work. I used fold and …

scala reduce fold
Equivalent of Scala's foldLeft in Java 8

What is the equivalent of of Scala's great foldLeft in Java 8? I was tempted to think it was reduce, but …

java java-8 reduce foldleft
ES6 - Removing duplicates from array of objects

Assuming an array of objects as follows: const listOfTags = [ {id: 1, label: "Hello", color: "red", sorting: 0}, {id: 2, label: "World", color: "green", …

javascript dictionary filter unique reduce
Reduce function with three parameters

How does reduce function work in python3 with three parameters instead of two. So, for two, tup = (1,2,3) reduce(lambda x, …

python python-3.x reduce initializer
How to join multiple data frames using dplyr?

I want to left_join multiple data frames: dfs <- list( df1 = data.frame(a = 1:3, b = c("a", "b", "…

r dplyr reduce
"Reduce" function for Series

Is there an analog for reduce for a pandas Series? For example, the analog for map is pd.Series.apply, …

python performance pandas vectorization reduce
Sum javascript object propertyA values with same object propertyB in array of objects

How would one take a javascript array of objects such as: my objArr = [ {key:Mon Sep 23 2013 00:00:00 GMT-0400, val:42}, {key:Mon …

javascript arrays json object reduce
Is it valid to reduce on an empty set of sets?

Shouldn't this work? > val setOfSets = Set[Set[String]]() setOfSets: scala.collection.immutable.Set[Set[String]] = Set() > setOfSets reduce (_ …

scala collections set reduce
Python how to reduce multiple lists?

I am able to use map and sum to achieve this functionality, but how to use reduce? There are 2 lists: …

python sum reduce map-function
Sorting Array with JavaScript reduce function

Often I study some JavaScript interview questions, suddenly I saw a question about usage of reduce function for sorting an …

javascript algorithm sorting reduce