Closed nogo10 closed 8 years ago
You're missing a return
statement :)
Because you've missed a return.
const concatenated = stream.fold("", (a,b) => a + b)
In es5 is actually
var concatenated = stream.fold("", function (a,b){ return a + b});
On Thu, 30 Jun 2016 4:42 pm Juha Paananen notifications@github.com wrote:
Closed #669 https://github.com/baconjs/bacon.js/issues/669.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/baconjs/bacon.js/issues/669#event-708739170, or mute the thread https://github.com/notifications/unsubscribe/ABEGa8wl9YP9IuipqDLCo4CHLlwbmKtsks5qQ2VMgaJpZM4JBwHK .
Sorry... Slow to the thread.
On Thu, 30 Jun 2016 5:39 pm Darren Nolan me@darrennolan.com wrote:
Because you've missed a return.
const concatenated = stream.fold("", (a,b) => a + b)
In es5 is actually
var concatenated = stream.fold("", function (a,b){ return a + b});
On Thu, 30 Jun 2016 4:42 pm Juha Paananen notifications@github.com wrote:
Closed #669 https://github.com/baconjs/bacon.js/issues/669.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/baconjs/bacon.js/issues/669#event-708739170, or mute the thread https://github.com/notifications/unsubscribe/ABEGa8wl9YP9IuipqDLCo4CHLlwbmKtsks5qQ2VMgaJpZM4JBwHK .
Ok -thanks- solved for me ..im the slow one
As shown on stackoverflow question ES6 arrow function " => " works fine with observable.fold(seed, f)
However in strict ES5 syntax:
it doesn't work results in 'undefined' value on console