pub fn transform_kind<F>(&mut self, func: &mut F)
    where
        F: FnMut(&mut Expr) -> Option<ExprKind>,
    {
        if let Some(k) = func(self) {
            self.kind = k;
            return self.transform_kind(func);
        }
        for c in self.children_mut() {
            c.transform_kind(func);
        }
    }
Transform an expression by replacing its kind with another `ExprKind`.

The type of the expression is unmodified.
weld/src/ast/ast.rs