projects
/
lambda.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Jacobson as a monad
[lambda.git]
/
reader_monad_for_intensionality.mdwn
diff --git
a/reader_monad_for_intensionality.mdwn
b/reader_monad_for_intensionality.mdwn
index
5582734
..
7425be4
100644
(file)
--- a/
reader_monad_for_intensionality.mdwn
+++ b/
reader_monad_for_intensionality.mdwn
@@
-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;;
<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
</pre>
Then the individual concept `unit ann` is a rigid designator: a