Functional Reactive Programming library (RX like) for Rust - Reference
This can almost be considered an alpha version.
I am working on integrating more operators and adaptors such as:
- Sorting
- Merging
- Combining
- Joining
- Subjects
- Sharing (Clonable)
- Interval
- Multi-Thread
- Retrying
- TakeUntil
- SkipUntil
This example create a stream from an iterator, add 10 to all element and sum them up before printing the result.
extern crate asyncplify;
use asyncplify::*;
fn main() {
let v = (0..10)
.into_stream() // convert the iterator into a stream
.map(|v| v + 10) // add 10 to all elements of the stream
.sum() // sum it up
.last_value() // return the last value
.unwrap();
println!("the sum is {}", v);
}
The MIT License (MIT) Copyright (c) 2016 Dany Laporte