pub fn sequence<'a, Brand: Traversable, F: Applicative, A: 'a + Clone>(
ta: <Brand as Kind_c3c3610c70409ee6>::Of<'a, <F as Kind_c3c3610c70409ee6>::Of<'a, A>>,
) -> <F as Kind_c3c3610c70409ee6>::Of<'a, <Brand as Kind_c3c3610c70409ee6>::Of<'a, A>>where
<F as Kind_c3c3610c70409ee6>::Of<'a, A>: Clone,
<Brand as Kind_c3c3610c70409ee6>::Of<'a, A>: Clone,Expand description
Evaluate each computation in a Traversable structure and accumulate the results into an Applicative context.
Free function version that dispatches to the type class’ associated function.
§Type Signature
forall a f. (Traversable t, Applicative f) => (t (f a)) -> f (t a)
§Parameters
ta: The traversable structure containing values in an applicative context.
§Returns
The traversable structure wrapped in the applicative context.
§Examples
use fp_library::classes::traversable::sequence;
use fp_library::brands::OptionBrand;
let x = Some(Some(5));
let y = sequence::<OptionBrand, OptionBrand, _>(x);
assert_eq!(y, Some(Some(5)));