Reactive Extensions for Lua

bjorn 33d842e89e Write comments for Schedulers; 10 жил өмнө
doc 638ed4476b Update README; Improve documentation slightly; 10 жил өмнө
examples 4175fde3a7 Add intro line to README; Update coroutine example; 10 жил өмнө
LICENSE d64834faa6 Initial commit; 10 жил өмнө
README.md 4175fde3a7 Add intro line to README; Update coroutine example; 10 жил өмнө
rx.lua 33d842e89e Write comments for Schedulers; 10 жил өмнө

README.md

RxLua

Reactive Extensions for Lua.

Examples

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.

Documentation

See here.

License

MIT, see LICENSE for details.