X-Git-Url: http://lambda.jimpryor.net/git/gitweb.cgi?p=lambda.git;a=blobdiff_plain;f=code%2Funtyped_evaluator.ml;h=5ccecb50296b578f490b590f10dc97f85ec984a4;hp=a60b2a1d0ec54c9a82936ccca47762905471521e;hb=30e80630a4bdb0ec23dd7098f735b060f6a3de0f;hpb=51d15385556bddc2e53ee2ea928a3007528872a3 diff --git a/code/untyped_evaluator.ml b/code/untyped_evaluator.ml index a60b2a1d..5ccecb50 100644 --- a/code/untyped_evaluator.ml +++ b/code/untyped_evaluator.ml @@ -1,5 +1,5 @@ (* - 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. @@ -61,7 +61,7 @@ and env = (identifier * term) list (* 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