Expand description
Data structures that can be folded in parallel using thread-safe functions.
Note: The rayon feature must be enabled to use parallel iteration.
§Examples
use fp_library::{brands::*, functions::*};
let v = vec![1, 2, 3, 4, 5];
let f = send_cloneable_fn_new::<ArcFnBrand, _, _>(|x: i32| x.to_string());
let result: String = par_fold_map::<ArcFnBrand, VecBrand, _, _>(f, v);
assert_eq!(result, "12345");Traits§
- ParFoldable
- A type class for data structures that can be folded in parallel.
Functions§
- par_
fold_ map - Parallel fold_map operation.
- par_
fold_ right - Parallel fold_right operation.