Back to problems

Implement Reduce and Derive Map and Filter from It

Object-Oriented Programming · Tesla · Medium

Task Describe how reduce should be implemented, then express the behavior of both map and filter in terms of that same reduce operation. Close by discussing how the three primitives compose when the data being handled is a collection of rows from a table. Part 1 — Defining the Reduce Contract Nail down four details: what the reducer callback receives and returns, what the accumulator holds, the order in which elements are visited, and what the operation does when it is…

Checking your access…