Swift library to control streams on Functional Reactive Programming model
MIT License
Swift library to control streams on Functional Reactive Programming model
let stream = Stream<String>()
let counterStream: Stream<Int> = stream.map({ message in
return countElements(message)
}).scan(0, { previousMessage, message in
return previousMessage + message
}).subscribe({ message in
println(message)
})
stream.publish("Hello, ") //=> 7
stream.publish("wor") //=> 10
stream.publish("ld!") //=> 13
TODO
TODO
Stream is available under the MIT license. See the LICENSE file for more info.