(*
- This is a simplified version of the code at http://lambda.jimpryor.net/code/untyped_full-1.5.tgz
+ This is a simplified version of the code at http://lambda.jimpryor.net/code/untyped_full-1.7.tgz
You can use this code as follows:
1. First, use a text editor to fill in the (* COMPLETE THIS *) portions.
(* Operations for environments *)
let empty = []
let shift (ident : identifier) binding env = (ident,binding) :: env
-let rec lookup (sought_ident : ident) (env : env) : term option =
+let rec lookup (sought_ident : identifier) (env : env) : term option =
match env with
| [] -> None
| (ident, binding) :: _ when ident = sought_ident -> Some binding