Encapsulates an expression within parentheses. This class is used to enforce precedence in mathematical or logical expressions by ensuring that the enclosed expression is evaluated as a single unit.
The Parentheses class extends Factor and wraps an Expr instance, delegating evaluation and rendering tasks to the underlying expression.
Value parameters
e
the expression encapsulated within the parentheses
Generates a string representation of the expression enclosed in parentheses at the specified indentation level. This method formats the output with line breaks and indentation, using the result of e.show recursively with an increased indentation level.
Generates a string representation of the expression enclosed in parentheses at the specified indentation level. This method formats the output with line breaks and indentation, using the result of e.show recursively with an increased indentation level.
Value parameters
i
the indentation level applied to format the output
Attributes
Returns
a string representation of the expression enclosed in parentheses, formatted with appropriate line breaks and indentation
Evaluates the value of the expression encapsulated by the Parentheses instance. Delegates the evaluation to the underlying expression e.
Evaluates the value of the expression encapsulated by the Parentheses instance. Delegates the evaluation to the underlying expression e.
Attributes
Returns
a Try[T] representing the evaluation result of the expression. Returns a Success if the evaluation completes without errors, or a Failure if any error occurs.