X-Git-Url: http://lambda.jimpryor.net/git/gitweb.cgi?p=lambda.git;a=blobdiff_plain;f=assignment10.mdwn;h=f16718ddc160e9667fc5e28afeb7f8b01e7e441e;hp=77449d5b886076bf84e7726c420284a81157f7e7;hb=73b21c99d5a3f8184681a1fa1e0bb2b44ab4c34f;hpb=035bb2f5a22e47a9b7f2d7059563e35eef47ff62 diff --git a/assignment10.mdwn b/assignment10.mdwn index 77449d5b..f16718dd 100644 --- a/assignment10.mdwn +++ b/assignment10.mdwn @@ -29,7 +29,7 @@ Of course, if you need help or want us to review your efforts, we'll be glad to As Ken Shan points out, this is an instance of the algorithm for converting name/year citations (like 'see Montague 1970') to numerals corresponding to their position in the - bibliography ('see [24]'). Except that bibliograpic numerals + bibliography ('see [24]'). Except that bibliographic numerals don't start with zero. Give some thought to efficiency: there are straightforward @@ -73,7 +73,7 @@ Of course, if you need help or want us to review your efforts, we'll be glad to fun s -> M.bind (u s) (fun (a, s') -> f a s');; let elevate (m : 'a M) : 'a stateT(M) = - fun s -> Wrapped.bind w (fun a -> Wrapped.unit (a, s));; + fun s -> M.bind w (fun a -> M.unit (a, s));; That won't compile in OCaml because we use the `M`s in a way that's intuitive but unrecognized by OCaml. What OCaml will recognize is more complex. Don't worry; you won't need to code a general implementation of StateT.