map breaks flatMap inside pipeline
Open
- Dominant language
- JavaScript
- Stars
- 3.4k
- Forks
- 145
- PR merge metrics
- No merged PRs in 30d
Description
I've ran across a very peculiar issue. In the code below, the console log will output 1, 2, 3, just as expected, as long as I pass x through the _works_ stream, but I instead switch to the _broken_ stream, the one with the map, only value 1 will be printed.
``` javascript
var thr = _.pipeline(function(inputStream) {
return inputStream.flatMap(function(x) {
var broken = _().map(function(p) { return p })
var works = _()
return _([x]).through(broken)
}).through(_())
})
thr.each(function(val) {
return console.log(val)
});
thr.write(1)
thr.write(2)
thr.write(3)
```
Contributor guide
Assessment
This issue has not been assessed yet.