|
пре 10 година | |
---|---|---|
doc | пре 10 година | |
examples | пре 10 година | |
tools | пре 10 година | |
LICENSE | пре 10 година | |
README.md | пре 10 година | |
rx.lua | пре 10 година |
Reactive Extensions for Lua.
Cheer someone on using functional reactive programming:
local Rx = require 'rx'
local observable = Rx.Observable.fromCoroutine(function()
for i = 2, 8, 2 do
coroutine.yield(i)
end
return 'who do we appreciate'
end)
observable
:map(function(value) return value .. '!' end)
:subscribe(print)
repeat
Rx.scheduler:update()
until Rx.scheduler:isEmpty()
See examples for more.
See here.
MIT, see LICENSE
for details.