// Import the classes "Env<T>" and "Expr<T>" of the "interpreter" package
// (which consists of the Jazz source files in the "interpreter" subdirectory
// of the current directory) as well as the global functions "variable",
// "constant", "add", "mult", and "concat" used to build new syntactic
// expressions. These functions are static members of the "Expr<T>" class and
// are imported by the second import statement.

import interpreter.*;
import interpreter.Expr.*;

// Variables
var x = variable("x");
var y = variable("y");
var z = variable("z");

// String expressions
var env = Env.empty.extend("x", "abc");
var e = concat(x, concat(constant("def"), constant("gh")));

// Evaluate e in env
@ e.eval(env);

// Numeric expressions
var env' = Env.empty.extend("x", 1.0).extend("y", 2/3).extend("z", -1/7);
var e' = plus(x, mult(y, plus(z, constant(1))));

// Evaluate e' in env'
@ e'.eval(env');