Skip to main content

Module par_compactable

Module par_compactable 

Source
Expand description

Data structures that can be compacted and separated in parallel.

§Examples

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

let v = vec![Some(1), None, Some(3)];
let result: Vec<i32> = par_compact::<VecBrand, _>(v);
assert_eq!(result, vec![1, 3]);

Traits§

ParCompactable
A type class for data structures that can be compacted and separated in parallel.

Functions§

par_compact
Compacts a data structure of Options in parallel, discarding None values and keeping Some values.
par_separate
Separates a data structure of Results into two data structures in parallel.