git ssb

2+

Dominic / pull-stream



Commit 4c7ae55ea2df8d52977d122b65825b9350020303

Don't share counter state in random example

Nick Niemeir committed on 6/22/2016, 8:02:52 PM
Parent: 3761392134a6c580635137cb17b6e3d109e0eac5

Files changed

README.mdchanged
README.mdView
@@ -68,10 +68,10 @@
6868 Unless, it is a call to abort the stream (`read(truthy, cb)`).
6969
7070 ```js
7171 //a stream of 100 random numbers.
72-var i = 100
7372 var random = function () {
73+ var i = 100
7474 return function (end, cb) {
7575 if(end) return cb(end)
7676 //only read 100 times
7777 if(i-- < 0) return cb(true)

Built with git-ssb-web