pub fn calculate_formula(
    formula: types::Formula,
    f: Option<&impl Fn(String) -> types::Value>,
) -> types::Value {
    match formula {
        types::Formula::Operation(exp) => calculate_operation(exp, f),
        types::Formula::Value(val) => val,
        types::Formula::Reference(string) => calculate_reference(string, f),
        types::Formula::Iterator(vec) => calculate_iterator(vec, f),
    }
}
/// Evaluates a string that was parsed and stored in Expression Struct.
/// Takes an optional closure with the trait bound Fn(String) -> types::Value.
Evaluates a string that was parsed and stored in Expression Struct.
Takes an optional closure with the trait bound Fn(String) -> types::Value.
Evaluates a string that was parsed and stored in Expression Struct . Takes an optional closure with the trait bound Fn ( String ) - > types :: Value .
pub fn calculate_formula(
    formula: types::Formula,
    f: Option<&impl Fn(String) -> types::Value>,
) -> types::Value {
    match formula {
        types::Formula::Operation(exp) => calculate_operation(exp, f),
        types::Formula::Value(val) => val,
        types::Formula::Reference(string) => calculate_reference(string, f),
        types::Formula::Iterator(vec) => calculate_iterator(vec, f),
    }
}
pub fn calculate_formula ( formula : types :: Formula , f : Option < & impl Fn ( String ) -> types :: Value > , ) -> types :: Value { match formula { types :: Formula :: Operation ( exp ) => calculate_operation ( exp , f ) , types :: Formula :: Value ( val ) => val , types :: Formula :: Reference ( string ) => calculate_reference ( string , f ) , types :: Formula :: Iterator ( vec ) => calculate_iterator ( vec , f ) , } }
Evaluates a string that was parsed and stored in Expression Struct.
Evaluates a string that was parsed and stored in Expression Struct .
formula
types::Formula
f
Option<&impl Fn(String) -> types::Value>