return function(source, timeSpan, timeShiftOrScheduler, scheduler)
    return source:windowWithTime(timeSpan, timeShiftOrScheduler, scheduler)
        :flatMap(function(window)
            return window:toArray()
        end)
end
