X-Git-Url: http://lambda.jimpryor.net/git/gitweb.cgi?p=lambda.git;a=blobdiff_plain;f=week7.mdwn;h=9f139c1648734b93cd944c15d16c095c5f0cfe52;hp=812f0496194160a66ec5fef774a848be07e2cc4d;hb=ea61c563f158b9f279a5efb28b407bc818af43d3;hpb=5eb5b091a62e66068007e326cc97ea1faaad2960 diff --git a/week7.mdwn b/week7.mdwn index 812f0496..9f139c16 100644 --- a/week7.mdwn +++ b/week7.mdwn @@ -62,8 +62,10 @@ that provides at least the following three elements: * A bind operation (note the type): +
      let bind m f = match m with None -> None | Some n -> f n;;
      val bind : 'a option -> ('a -> 'b option) -> 'b option = 
+
`bind` takes two arguments (a monadic object and a function from ordinary objects to monadic objects), and returns a monadic @@ -190,7 +192,7 @@ though without explicitly using monads. All of the code in the discussion below can be found here: [[intensionality-monad.ml]]. To run it, download the file, start Ocaml, and say `# #use -"intensionality-monad.ml"`. +"intensionality-monad.ml";;`. Here's the idea: since people can have different attitudes towards different propositions that happen to have the same truth value, we