Reduce requires that functions be pure (no side effects). Immutable.js is one way to enforce this but ithe is not required.<p>The examples mostly use things like the spread operator and Object.assign.