1 unstable release
Uses old Rust 2015
0.1.0 | Feb 19, 2018 |
---|
#7 in #evaluated
11KB
fibonnaci-stream
Stream a fibonnaci sequence.
Installation
$ cargo add fibonnaci-stream
Links
Further Reading
License
lib.rs
:
A lazily evaluated futures stream of Fibonnaci numbers.
Usage
extern crate fibonnaci_stream;
use fibonnaci_stream::{FibError, Stream};
fn main () {
let mut stream = FibStream::new();
stream.poll().and_then(|val| {
assert_eq!(val, Async::Ready(Some(1)));
stream.poll().and_then(|val| {
assert_eq!(val, Async::Ready(Some(2)));
Ok(())
});
Ok(())
});
}
Dependencies
~1.5MB
~39K SLoC