#[fp_macros::document_module]
mod inner {
use {
crate::{
classes::*,
kinds::*,
},
fp_macros::*,
};
pub trait Costrong: Profunctor {
#[document_signature]
#[document_type_parameters(
"The lifetime of the values.",
"The input type of the resulting profunctor.",
"The output type of the resulting profunctor.",
"The type of the second component (threaded through unchanged)."
)]
#[document_parameters("The profunctor instance to extract from.")]
#[document_returns("A profunctor operating on the unwrapped types.")]
#[document_examples]
fn unfirst<'a, A: 'a, B: 'a, C: 'a>(
pab: Apply!(<Self as Kind!( type Of<'a, T: 'a, U: 'a>: 'a; )>::Of<'a, (A, C), (B, C)>)
) -> Apply!(<Self as Kind!( type Of<'a, T: 'a, U: 'a>: 'a; )>::Of<'a, A, B>);
#[document_signature]
#[document_type_parameters(
"The lifetime of the values.",
"The input type of the resulting profunctor.",
"The output type of the resulting profunctor.",
"The type of the first component (threaded through unchanged)."
)]
#[document_parameters("The profunctor instance to extract from.")]
#[document_returns("A profunctor operating on the unwrapped types.")]
#[document_examples]
fn unsecond<'a, A: 'a, B: 'a, C: 'a>(
pab: Apply!(<Self as Kind!( type Of<'a, T: 'a, U: 'a>: 'a; )>::Of<'a, (C, A), (C, B)>)
) -> Apply!(<Self as Kind!( type Of<'a, T: 'a, U: 'a>: 'a; )>::Of<'a, A, B>) {
Self::unfirst(Self::dimap(|(a, c)| (c, a), |(c, b)| (b, c), pab))
}
}
#[document_signature]
#[document_type_parameters(
"The lifetime of the values.",
"The brand of the costrong profunctor.",
"The input type of the resulting profunctor.",
"The output type of the resulting profunctor.",
"The type of the second component (threaded through unchanged)."
)]
#[document_parameters("The profunctor instance to extract from.")]
#[document_returns("A profunctor operating on the unwrapped types.")]
#[document_examples]
pub fn unfirst<'a, Brand: Costrong, A: 'a, B: 'a, C: 'a>(
pab: Apply!(<Brand as Kind!( type Of<'a, T: 'a, U: 'a>: 'a; )>::Of<'a, (A, C), (B, C)>)
) -> Apply!(<Brand as Kind!( type Of<'a, T: 'a, U: 'a>: 'a; )>::Of<'a, A, B>) {
Brand::unfirst(pab)
}
#[document_signature]
#[document_type_parameters(
"The lifetime of the values.",
"The brand of the costrong profunctor.",
"The input type of the resulting profunctor.",
"The output type of the resulting profunctor.",
"The type of the first component (threaded through unchanged)."
)]
#[document_parameters("The profunctor instance to extract from.")]
#[document_returns("A profunctor operating on the unwrapped types.")]
#[document_examples]
pub fn unsecond<'a, Brand: Costrong, A: 'a, B: 'a, C: 'a>(
pab: Apply!(<Brand as Kind!( type Of<'a, T: 'a, U: 'a>: 'a; )>::Of<'a, (C, A), (C, B)>)
) -> Apply!(<Brand as Kind!( type Of<'a, T: 'a, U: 'a>: 'a; )>::Of<'a, A, B>) {
Brand::unsecond(pab)
}
}
pub use inner::*;