- The
Iterator
trait is converted toList
in Lean. Many functions defined in Lean's core are equivalent to Rust functions that operate on iterators.
Rust Iterator function | Lean equivalent function | Description link |
---|---|---|
std::iter::Iterator::flatten | flatten | https://doc.rust-lang.org/std/iter/trait.Iterator.html#method.flatten |
std::iter::Iterator::next | next | https://doc.rust-lang.org/std/iter/trait.Iterator.html#method.next |
std::iter::Iterator::peek | peek | https://doc.rust-lang.org/std/iter/trait.Iterator.html#method.peek |