Functional streams for JavaScript