You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
local Observable = require "rx.observable"
|
|
|
|
--- Returns an Observable that produces a single value representing the sum of the values produced
|
|
-- by the original.
|
|
-- @returns {Observable}
|
|
function Observable:sum()
|
|
return self:reduce(function(x, y)
|
|
return x + y
|
|
end, 0)
|
|
end
|