namespace Bts.ArithmeticExpressions; using System.Collections.Generic; class Variable : IArithmeticExpression { readonly string identifier; public Variable(string identifier) => this.identifier = identifier; public object? Evaluate(IDictionary env) => env.TryGetValue(identifier, out var val) ? val : throw new KeyNotFoundException( $"Failed to find {nameof(Variable)} '{identifier}'"); }