1 unstable release
Uses new Rust 2024
new 0.1.0 | Apr 10, 2025 |
---|
#1 in #folding
206 downloads per month
Used in eevee
3KB
find_fold behaves similarly to find_map, but instead of mapping as we make our way through the iterator, we fold. When we've found a value or a folding of values that we want, we can use ControlFlow::Break to break out of the fold with our value. If we never find what we want, return None. Effectively, this is an optional partial fold.
FindFold can be simply imported, and Iterators will have it as a method. This crate does not require [std], only using ControlFlow