1 2 3 4 5 6 7 8 9 10 11
use crate::hkt::HKT; pub trait Pure<A>: HKT<A, A> { fn of(self) -> <Self as HKT<A, A>>::Target; } impl<A> Pure<A> for Option<A> { fn of(self) -> Self::Target { self } }
1 2 3 4 5 6 7 8 9 10 11
use crate::hkt::HKT; pub trait Pure<A>: HKT<A, A> { fn of(self) -> <Self as HKT<A, A>>::Target; } impl<A> Pure<A> for Option<A> { fn of(self) -> Self::Target { self } }