Skip to content

Instantly share code, notes, and snippets.

@yelouafi
Created July 17, 2015 02:08
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 yelouafi/d2b08f03155f7c880fa2 to your computer and use it in GitHub Desktop.
Save yelouafi/d2b08f03155f7c880fa2 to your computer and use it in GitHub Desktop.
// length : Stream a -> Promise Number
Stream.prototype.length = function() {
return this.reduce( (n, _) => n + 1, 0 )
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment