code: function schedule(parent$, schedule, onDone = () => {}) {
    let iteration = 0;
    let newStream = fork$(parent$, value =>
      executeScheduleItem(schedule, iteration++, value)
    );
    if (schedule.length === iteration) onDone();
  
    parent$.listeners.push(function checkSchedule(value) {
      // do immediate to prevent schedule items to update parent streams before child streams ran
      setImmediate(async () => {
        newStream(await executeScheduleItem(schedule, iteration++, value));
        if (iteration === schedule.length) onDone();
      });
    });
    return newStream;
  }
docs: /*
  Especially in tests you want to define a reaction to a certain iteration of a stream
  The iteration can be a function or a value