I would like to use Bacon to combine time series with irregular timestamps in a single EventStream. Each event would contain the last value of each time series at the given time. Here is a an example
var ts1 = new Bacon.fromArray([
[1,2], //Each array is an event,i.e here timestamp is 1 and value is 2
[2,3],
[5,9]
])
var ts2 = new Bacon.fromArray([
[4,2],
[9,3],
[12,9]
])
What I would like to have is something like this
var ts12 =[
[1,2,undefined], //At time 1, only ts1 was defined
[2,3,undefined],
[4,3,2], //at time 4, we take the last value of ts1 (3) and ts2 (2)
[5,9,2],
[9,9,3],
[12,9,9],
]
I tried to implement it using Bacon.update but I didn't go very far. How would you approach the problem?