eval function
The evaluation function.
Implementation
dynamic eval(Environment env, dynamic expr) {
if (expr is Quote) {
return expr.datum;
} else if (expr is Cons) {
final Function function = eval(env, expr.head);
return function(env, expr.tail);
} else if (expr is Name) {
return env[expr];
} else {
return expr;
}
}