diff --git a/lerox/src/lib.rs b/lerox/src/lib.rs index 95c60c9..938910b 100644 --- a/lerox/src/lib.rs +++ b/lerox/src/lib.rs @@ -27,7 +27,7 @@ pub trait Combinator: Combinable + Sized { /// Returns the result of running f on self, or if it fails, the original self fn and_maybe(self, f: impl Fn(Self) -> Self) -> Self where Self: Clone { - self.clone().and(f).or(|_| self) + self.and_either(f, |g| g) } /// Returns the result of running f on self, or if it fails, runs g on self