The Factor class is an abstraction used to build the components of mathematical or logical expressions. It serves as a fundamental unit which can be combined with other components to form more complex expressions.
This class extends the Expression trait, inheriting capabilities for evaluation and display. Instances of Factor must provide concrete implementations for the abstract methods defined in Expression.
Evaluates the expression and returns the result wrapped in a Try. The Try indicates whether the evaluation was successful (Success) or resulted in an error (Failure).
Evaluates the expression and returns the result wrapped in a Try. The Try indicates whether the evaluation was successful (Success) or resulted in an error (Failure).
Attributes
Returns
a Try[T] containing either the result of the evaluation or an error.