pub fn true_when<'fml, A, B: 'fml>(
    mut proj: impl FnMut(&A) -> Option<B> + Send + Sync + 'fml,
    mut body: impl FnMut(B) -> bool + Send + Sync + 'fml,
) -> Formula<'fml, A> {
    eventually(examine(move |x: &A| {
        if let Some(b) = proj(x) {
            if body(b) {
                top()
            } else {
                fail("condition failed")
            }
        } else {
            bottom("condition not yet met")
        }
    }))
}
// When the project function matches, the condition evaluate to be true.
When the project function matches, the condition evaluate to be true.
When the project function matches the condition evaluate to be true .
pub fn true_when<'fml, A, B: 'fml>(
    mut proj: impl FnMut(&A) -> Option<B> + Send + Sync + 'fml,
    mut body: impl FnMut(B) -> bool + Send + Sync + 'fml,
) -> Formula<'fml, A> {
    eventually(examine(move |x: &A| {
        if let Some(b) = proj(x) {
            if body(b) {
                top()
            } else {
                fail("condition failed")
            }
        } else {
            bottom("condition not yet met")
        }
    }))
}
pub fn true_when < ' fml , A , B : ' fml > ( mut proj : impl FnMut ( & A ) -> Option < B > + Send + Sync + ' fml , mut body : impl FnMut ( B ) -> bool + Send + Sync + ' fml , ) -> Formula < ' fml , A > { eventually ( examine ( move | x : & A | { if let Some ( b ) = proj ( x ) { if body ( b ) { top ( ) } else { fail ( " " ) } } else { bottom ( " " ) } } ) ) }
When the project function matches, the condition evaluate to be true.
When the project function matches the condition evaluate to be true .
proj
impl FnMut(&A) -> Option<B> + Send + Sync + 'fml
body
impl FnMut(B) -> bool + Send + Sync + 'fml
proj
impl FnMut(&A) -> Option<B> + Send + Sync + 'fml
body
impl FnMut(B) -> bool + Send + Sync + 'fml