Expand description
A type class for data structures that can be filtered and partitioned.
§Examples
use fp_library::{brands::*, functions::*};
let x = Some(5);
let y = filter::<OptionBrand, _, _>(|a| a > 2, x);
assert_eq!(y, Some(5));Traits§
- Filterable
- A type class for data structures that can be filtered and partitioned.
Functions§
- filter
- Filters a data structure based on a predicate.
- filter_
map - Maps a function over a data structure and filters out
Noneresults. - partition
- Partitions a data structure based on a predicate.
- partition_
map - Partitions a data structure based on a function that returns a
Result.