pub fn iso_un_option<A: 'static, B: 'static>(
    i: ISO<Option<A>, Option<B>>
) -> ISO<A, B> {
    let i0 = i.0;
    let i1 = i.1;
    iso(
        move |a| i0(Some(a)).unwrap_or_else(|| i0(None).unwrap()),
        move |b| i1(Some(b)).unwrap_or_else(|| i1(None).unwrap()),
    )
}
/// Going another way is hard (and is generally impossible)
/// Remember, for all valid ISO, converting and converting back
/// is the same as the original value.
/// You need this to prove some case are impossible.
Going another way is hard (and is generally impossible)
Remember, for all valid ISO, converting and converting back
is the same as the original value.
You need this to prove some case are impossible.
Going another way is hard ( and is generally impossible ) Remember for all valid ISO converting and converting back is the same as the original value . You need this to prove some case are impossible .
pub fn iso_un_option<A: 'static, B: 'static>(
    i: ISO<Option<A>, Option<B>>
) -> ISO<A, B> {
    let i0 = i.0;
    let i1 = i.1;
    iso(
        move |a| i0(Some(a)).unwrap_or_else(|| i0(None).unwrap()),
        move |b| i1(Some(b)).unwrap_or_else(|| i1(None).unwrap()),
    )
}
pub fn iso_un_option < A : ' static , B : ' static > ( i : ISO < Option < A > , Option < B > > ) -> ISO < A , B > { let i0 = i . 0 ; let i1 = i . 1 ; iso ( move | a | i0 ( Some ( a ) ) . unwrap_or_else ( | | i0 ( None ) . unwrap ( ) ) , move | b | i1 ( Some ( b ) ) . unwrap_or_else ( | | i1 ( None ) . unwrap ( ) ) , ) }
Going another way is hard (and is generally impossible)
Remember, for all valid ISO, converting and converting back
is the same as the original value.
Going another way is hard ( and is generally impossible ) Remember for all valid ISO converting and converting back is the same as the original value .
i
ISO<Option<A>, Option<B>>
i
ISO<Option<A>, Option<B>>