Reactive Extensions for Lua

bjorn 638ed4476b Update README; Improve documentation slightly; 10 سال پیش
doc 638ed4476b Update README; Improve documentation slightly; 10 سال پیش
examples 322171c216 Use scheduler in Observable.fromCoroutine; Cooperative.isEmpty; 10 سال پیش
LICENSE d64834faa6 Initial commit; 10 سال پیش
README.md 638ed4476b Update README; Improve documentation slightly; 10 سال پیش
rx.lua 638ed4476b Update README; Improve documentation slightly; 10 سال پیش

README.md

RxLua

How to use:

local Rx = require 'rx'

-- Cheer someone on using functional reactive programming

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.