fn try_to_distribute_unary_op(
        &self,
        recursive_op: fn(&Rc<AbstractValue>) -> Rc<AbstractValue>,
        operation: fn(Rc<AbstractValue>) -> Rc<AbstractValue>,
    ) -> Rc<AbstractValue> {
        if let ConditionalExpression {
            condition,
            consequent,
            alternate,
        } = &self.expression
        {
            return condition
                .conditional_expression(recursive_op(consequent), recursive_op(alternate));
        };
        if let Join { left, right } = &self.expression {
            return recursive_op(left).join(recursive_op(right));
        }
        operation(self.clone())
    }
/// Tries to distribute the operation over self and/or other.
/// Return operation(self) if no simplification is possible.
Tries to distribute the operation over self and/or other.
Return operation(self) if no simplification is possible.
Tries to distribute the operation over self and / or other . Return operation ( self ) if no simplification is possible .
fn try_to_distribute_unary_op(
        &self,
        recursive_op: fn(&Rc<AbstractValue>) -> Rc<AbstractValue>,
        operation: fn(Rc<AbstractValue>) -> Rc<AbstractValue>,
    ) -> Rc<AbstractValue> {
        if let ConditionalExpression {
            condition,
            consequent,
            alternate,
        } = &self.expression
        {
            return condition
                .conditional_expression(recursive_op(consequent), recursive_op(alternate));
        };
        if let Join { left, right } = &self.expression {
            return recursive_op(left).join(recursive_op(right));
        }
        operation(self.clone())
    }
fn try_to_distribute_unary_op ( & self , recursive_op : fn ( & Rc < AbstractValue > ) -> Rc < AbstractValue > , operation : fn ( Rc < AbstractValue > ) -> Rc < AbstractValue > , ) -> Rc < AbstractValue > { if let ConditionalExpression { condition , consequent , alternate , } = & self . expression { return condition . conditional_expression ( recursive_op ( consequent ) , recursive_op ( alternate ) ) ; } ; if let Join { left , right } = & self . expression { return recursive_op ( left ) . join ( recursive_op ( right ) ) ; } operation ( self . clone ( ) ) }
Tries to distribute the operation over self and/or other.
Tries to distribute the operation over self and / or other .
&self
recursive_op
fn(&Rc<AbstractValue>) -> Rc<AbstractValue>
operation
fn(Rc<AbstractValue>) -> Rc<AbstractValue>