X-Git-Url: http://lambda.jimpryor.net/git/gitweb.cgi?p=lambda.git;a=blobdiff_plain;f=reader_monad_for_intensionality.mdwn;h=7425be417683bf126d7841d5fd3ac08ccc94609d;hp=558273409ec47ab8f8df8d88878b2d99f7d33f5c;hb=adaf5a4a914b56ca7be6c3fce6da8269e1ed23ca;hpb=26ef3ad43ed5d4e912bed99daccb990c0840052c diff --git a/reader_monad_for_intensionality.mdwn b/reader_monad_for_intensionality.mdwn index 55827340..7425be41 100644 --- a/reader_monad_for_intensionality.mdwn +++ b/reader_monad_for_intensionality.mdwn @@ -128,7 +128,9 @@ Now we are ready for the intensionality monad:
 type 'a intension = s -> 'a;;
 let unit x = fun (w:s) -> x;;
-let bind u f = fun (w:s) -> f (u w) w;;
+(* as before, bind can be written more compactly, but having
+   it spelled out like this will be useful down the road *)
+let bind u f = fun (w:s) -> let a = u w in let u' = f a in u' w;;
 
Then the individual concept `unit ann` is a rigid designator: a