FIND YOUR NEXT FEW LINES
Results for “reduce”
Small, practical examples. Search by task or narrow things down below.
16 snippets foundClear filters
Calculate a least common multiple using a GCD
C: Divide before multiplying to reduce the risk of intermediate overflow.
C✓ Tested
Filter a selection
Reduce a jQuery selection to elements with a matching class.
jQuery✓ Tested
Sum integer values
Reduce a Java integer stream to its sum.
Java✓ Tested
Sum numeric values
Provide an initial accumulator for JavaScript reduce, including empty arrays.
JavaScript✓ Tested