Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Stream.prototype.log = function(prefix) {
this.forEach(
v => console.log(prefix, v),
err => console.log(prefix, ' error!!', err),
() => console.log(prefix, ' end.')
);
}
Stream.seq([1,2,3], 0, 1000).log('seq')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.