pub struct RecursionSchemeEval;Expand description
RecursionSchemeEval provides catamorphism and anamorphism over RoseTree.
Implementations§
Source§impl RecursionSchemeEval
impl RecursionSchemeEval
Sourcepub fn cata<A, B>(tree: RoseTree<A>, alg: &dyn Fn(A, Vec<B>) -> B) -> B
pub fn cata<A, B>(tree: RoseTree<A>, alg: &dyn Fn(A, Vec<B>) -> B) -> B
Catamorphism (fold) over a RoseTree.
alg(a, children_results) computes the result at each node.
Auto Trait Implementations§
impl Freeze for RecursionSchemeEval
impl RefUnwindSafe for RecursionSchemeEval
impl Send for RecursionSchemeEval
impl Sync for RecursionSchemeEval
impl Unpin for RecursionSchemeEval
impl UnsafeUnpin for RecursionSchemeEval
impl UnwindSafe for RecursionSchemeEval
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