Skip to content

Instantly share code, notes, and snippets.

@granmoe
Last active April 16, 2018 02:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save granmoe/ffce6559501f9f6ba0d6aec6c5605b0e to your computer and use it in GitHub Desktop.
Save granmoe/ffce6559501f9f6ba0d6aec6c5605b0e to your computer and use it in GitHub Desktop.
const product = reduce((accum, current) => accum * current, 1)
const all = reduce((accum, current) => accum && current, true)
const any = reduce((accum, current) => accum || current, false)
const length = reduce(accum => accum + 1, 0)
const reverse = reduce((accum, current) => [current, ...accum], [])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment