Topics for Midterm I
% Programming in ML
% Abstract and concrete syntax
% Lexical Scope
% Substitution-based evaluation and equivalence  

What won't be on the exam
% complexities of ML syntax (see note below)
% complexities of ML module system
% programming with mutable data structures in ML
% anything covered after Friday, Feb 6th.

The exam may ask you to:
% rewrite ML programs to match the CSE 340 style
% write recursive functions over lists and datatypes
% use maps and folds (and higher-order functions)
% determine whether an expression is syntactically correct given some BNF grammar
% determine the binding occurrences of variables in Scheme and ML code (including lambda, let, letrec (for Scheme), let rec and match (for ML))
% determine the free and bound variables
% determine whether two programs are alpha-equivalent (i.e. can be made identical by renaming bound variables)
% determine whether two programs are beta-equivalent (i.e. can be made alpha-equivalent through internal reductions)
% show the result of substitution of closed expressions
% extend the implementation of a substitution-based evaluator to new expression forms
% or something else not on this list but related to the topics above

Some of the problems may ask you to write O'Caml or Scheme code. Minor syntactic errors will not be deducted, assuming that I can understand what you meant. If there is ambiguity about the meaning of your program, then I will be forced to deduct points. Therefore, make sure you comment your code and be as explicit as possible.