spell out reader-bind more explicitly
[lambda.git] / reader_monad_for_intensionality.mdwn
index 5582734..7425be4 100644 (file)
@@ -128,7 +128,9 @@ Now we are ready for the intensionality monad:
 <pre>
 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;;
 </pre>
 
 Then the individual concept `unit ann` is a rigid designator: a