Top "Reduce" questions

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

python histogram one-liner

There are many ways to write a Python program that computes a histogram. By histogram, I mean a function that …

python histogram reduce counting
How to map/reduce/filter a Set in JavaScript?

Is there any way to map/reduce/filter/etc a Set in JavaScript or will I have to write my …

javascript set ecmascript-6 reduce
Using the reduce function to return an array

Why is it that when I want to use the push function inside the reduce function to return a new …

javascript arrays reduce
What is basic difference between fold and reduce in Kotlin? When to use which?

I am pretty confused with this both functions fold() and reduce() in Kotlin, can anyone give me a concrete example …

kotlin reduce fold
TypeError: this.reduce is not a function

After adding a method to the Array prototype, some other, unrelated script breaks. [Opera] Unhandled Error: 'this.reduce' is not …

javascript arrays prototype typeerror reduce
Javascript: Using reduce() to find min and max values?

I have this code for a class where I'm supposed to use the reduce() method to find the min and …

javascript arrays reduce
JavaScript array .reduce with async/await

Seem to be having some issues incorporating async/await with .reduce(), like so: const data = await bodies.reduce(async(accum, …

javascript promise async-await reduce ecmascript-next
Difference between fold and reduce?

Trying to learn F# but got confused when trying to distinguish between fold and reduce. Fold seems to do the …

f# functional-programming reduce fold
Reduce Hash Values

I am having trouble with the syntax for reduce. I have a hash of the following format: H = {"Key1" => 1, "…

ruby hash reduce
Understand the `Reduce` function

I have a question about the Reduce function in R. I read its documentation, but I am still confused a …

r reduce