iter-rationals

crate documentation

This crate implements an iterator over the [rational numbers] which:

The algorithm is described in [Functional Pearl: Enumerating the Rationals] by Gibbons, Lester, and Bird; see the paper for an explanation of how it works.

Usage

```rust use iter_rationals::Rationals;

fn main() { let rs = Rationals::::new();

for r in rs.take(20) {
    println!("{r}");
}

} ```

Installation

Add this dependency to your Cargo.toml:

iter-rationals = "0.1"

or on the command line:

cargo add iter-rationals

License