pub fn update_with(
        self,
        expr_update: impl FnOnce(RcExpr) -> RcExpr,
        asgn_update: impl FnOnce(Assignment) -> Assignment,
    ) -> Self {
        let kind = match self.kind {
            StmtKind::Expr(expr) => expr_update(expr).into(),
            StmtKind::Assignment(asgn) => asgn_update(asgn).into(),
        };
        Self { kind, ..self }
    }
/// Update `self` with a fresh statement [kind](StmtKind), given functions for how a statement
/// should be generated.
Update `self` with a fresh statement [kind](StmtKind), given functions for how a statement
should be generated.
Update ` self ` with a fresh statement [ kind ] ( StmtKind ) given functions for how a statement should be generated .
pub fn update_with(
        self,
        expr_update: impl FnOnce(RcExpr) -> RcExpr,
        asgn_update: impl FnOnce(Assignment) -> Assignment,
    ) -> Self {
        let kind = match self.kind {
            StmtKind::Expr(expr) => expr_update(expr).into(),
            StmtKind::Assignment(asgn) => asgn_update(asgn).into(),
        };
        Self { kind, ..self }
    }
pub fn update_with ( self , expr_update : impl FnOnce ( RcExpr ) -> RcExpr , asgn_update : impl FnOnce ( Assignment ) -> Assignment , ) -> Self { let kind = match self . kind { StmtKind :: Expr ( expr ) => expr_update ( expr ) . into ( ) , StmtKind :: Assignment ( asgn ) => asgn_update ( asgn ) . into ( ) , } ; Self { kind , .. self } }
Update `self` with a fresh statement [kind](StmtKind), given functions for how a statement
should be generated.
Update ` self ` with a fresh statement [ kind ] ( StmtKind ) given functions for how a statement should be generated .
self
expr_update
impl FnOnce(RcExpr) -> RcExpr
asgn_update
impl FnOnce(Assignment) -> Assignment
self
expr_update
impl FnOnce(RcExpr) -> RcExpr
asgn_update
impl FnOnce(Assignment) -> Assignment