MonadFail for OptionClass

This commit is contained in:
AF 2023-04-26 03:41:56 +00:00
parent bd361833b5
commit 41972e28c5

View File

@ -123,6 +123,15 @@ impl LocalFunctor for OptionClass {
} }
} }
impl MonadFail<()> for OptionClass {
fn fail<'a, A: 'a>(_e: ()) -> Self::F<'a, A>
where
Self: 'a,
(): 'a {
None
}
}
#[cfg(test)] #[cfg(test)]
mod option_tests { mod option_tests {
use super::{test_suite, tests, Functor}; use super::{test_suite, tests, Functor};