X-Git-Url: http://lambda.jimpryor.net/git/gitweb.cgi?p=lambda.git;a=blobdiff_plain;f=hints%2Fassignment_7_hint_2.mdwn;h=07d6a7ce0d72eb78b63a064803c259f051137350;hp=3a3accae5cb1e99155654ed756660dfee19c6b00;hb=00fb05d9ee37681282813893ee69ed7441fe1273;hpb=f13c3904992a39aa33db9c1c80a4a984dabc341b diff --git a/hints/assignment_7_hint_2.mdwn b/hints/assignment_7_hint_2.mdwn index 3a3accae..07d6a7ce 100644 --- a/hints/assignment_7_hint_2.mdwn +++ b/hints/assignment_7_hint_2.mdwn @@ -24,7 +24,12 @@ let bind_set (u: 'a set) (f: 'a -> 'b set) = List.concat (List.map f u);; -* So GS&V's information states, which they notate using `s`, are set-monads, whose elements in turn are discourse possibilities, which they notate using `i`, which are state monads that keep track of which entities have been introduced as objects of discourse, and which variables are bound to them, in a given discourse possibility. In GS&V's system, possibilities are triples of an assignment function, `r`, a store `g`, and a world `w`. We're leaving the worlds out. Also, instead of just working with pairs `(r, g)`, we're working with state monads for which those pairs constitute the states we update. +The following will be useful later: persuade yourself that `List.filter (test : 'a -> bool) (u : 'a set) : 'a set` is the same as: + + bind_set u (fun a -> if test a then unit_set a else empty_set) + + +* So GS&V's information states, which they notate using `s`, are set-monads, whose elements in turn are discourse possibilities, which they notate using `i`, which are state monads that keep track of which entities have been introduced as objects of discourse, and which variables are bound to them, in the discourse possibility in question. In GS&V's system, possibilities are triples of an assignment function, `r`, a store `g`, and a world `w`. We're leaving the worlds out. Also, instead of just working with pairs `(r, g)`, we're working with state monads for which those pairs constitute the states we update. * [More hints](/hints/assignment_7_hint_3).