Function evaluate
Source pub fn evaluate(
statement: Statement,
env: &mut Environment,
) -> Result<f64, String>
Expand description
Evaluates a statement and returns its result.
§Arguments
statement - The statement to evaluate.
env - The environment to use for variable lookups and assignments.
§Returns
The result of the evaluation, or an error if evaluation fails.