pub enum FreeMonad<A> {
Pure(A),
Free(Box<dyn FnOnce() -> FreeMonad<A>>),
}Expand description
A free monad over a functor F, with values in A.
Variants§
Pure(A)
The pure/return constructor
Free(Box<dyn FnOnce() -> FreeMonad<A>>)
The free/join constructor wrapping a functor layer
Implementations§
Auto Trait Implementations§
impl<A> Freeze for FreeMonad<A>where
A: Freeze,
impl<A> !RefUnwindSafe for FreeMonad<A>
impl<A> !Send for FreeMonad<A>
impl<A> !Sync for FreeMonad<A>
impl<A> Unpin for FreeMonad<A>where
A: Unpin,
impl<A> UnsafeUnpin for FreeMonad<A>where
A: UnsafeUnpin,
impl<A> !UnwindSafe for FreeMonad<A>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more