Skip to main content

Module par_functor

Module par_functor 

Source
Expand description

Data structures that can be mapped over in parallel.

§Examples

use fp_library::{
	brands::*,
	functions::*,
};

let v = vec![1, 2, 3];
let result: Vec<i32> = par_map::<VecBrand, _, _>(|x| x * 2, v);
assert_eq!(result, vec![2, 4, 6]);

Traits§

ParFunctor
A type class for data structures that can be mapped over in parallel.

Functions§

par_map
Maps a function over a data structure in parallel.