Skip to content
#

parallel

Here are 112 public repositories matching this topic...

rubico
richytong
richytong commented Oct 1, 2020

Syntax

var T any,
  args ...any,
  accumulator any,
  reducer (any, T)=>any,
  init (...args=>accumulator)|accumulator

reduce.sync(reduce, init?)(...args) -> any

Synchronous reduce without promise handling. Only for arrays (for now)

const add = (a, b) => a + b

console.log(
  reduce.sync(add, 0)([1, 2, 3, 4, 5]),
) // 15
  1. Implement

Improve this page

Add a description, image, and links to the parallel topic page so that developers can more easily learn about it.

Curate this topic

Add this topic to your repo

To associate your repository with the parallel topic, visit your repo's landing page and select "manage topics."

Learn more

You can’t perform that action at this time.