Reactive Extensions for Lua

bjorn df55767558 Start subjects; пре 10 година
doc b6e5811b3e Documentation for Observable:distinct; пре 10 година
examples df55767558 Start subjects; пре 10 година
tools bc5ab99d3c Update documentation; пре 10 година
LICENSE d64834faa6 Initial commit; пре 10 година
README.md bc5ab99d3c Update documentation; пре 10 година
rx.lua df55767558 Start subjects; пре 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.