#[fp_macros::document_module]
mod inner {
use {
crate::classes::*,
fp_macros::*,
};
#[document_type_parameters(
"The lifetime of the function.",
"The source type of the structure.",
"The type of the focuses."
)]
#[document_parameters("The fold function itself.")]
pub trait FoldFunc<'a, S, A> {
#[document_signature]
#[document_type_parameters("The monoid type to fold into.")]
#[document_parameters("The mapping function.", "The structure to fold.")]
#[document_returns("The combined monoid value.")]
#[document_examples]
fn apply<R: Monoid>(
&self,
f: impl Fn(A) -> R + 'a,
s: S,
) -> R;
}
}
pub use inner::*;