X-Git-Url: http://lambda.jimpryor.net/git/gitweb.cgi?p=lambda.git;a=blobdiff_plain;f=code%2Funtyped_evaluator_complete.ml;h=f918d3a4c64a83d1ee0ac81b1344f9acf4aeaed3;hp=f61f7008d6415c2b9a25a70e1b13e58523d09cf9;hb=8cd2e41084d42df6db49d6ea9e3183c709a54837;hpb=c020d523d552a2d118e8a28688c84438c0437e35 diff --git a/code/untyped_evaluator_complete.ml b/code/untyped_evaluator_complete.ml index f61f7008..f918d3a4 100644 --- a/code/untyped_evaluator_complete.ml +++ b/code/untyped_evaluator_complete.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