UNPKG

reducible

Version:

High-order abstraction for reducible data structures

16 lines (12 loc) 418 B
"use strict"; // Exported function can be used for boxing values. This boxing indicates // that consumer of sequence has finished consuming it, there for new values // should not be no longer pushed. function reduced(value) { /** Boxes given value and indicates to a source that it's already reduced and no new values should be supplied **/ return { value: value, is: reduced } } module.exports = reduced