X-Git-Url: http://lambda.jimpryor.net/git/gitweb.cgi?p=lambda.git;a=blobdiff_plain;f=hints%2Fassignment_7_hint_4.mdwn;h=568a9cc0ae856a09014ac38a9a4973c42012a873;hp=1ae1a7a5c8809b96d650eae0fb2ce1d70836c7cf;hb=42a3335d8d35d189aa7de17622cd3e61d9d4b72f;hpb=7d2afb25c88af0838b8c957b2037ef950a00230c diff --git a/hints/assignment_7_hint_4.mdwn b/hints/assignment_7_hint_4.mdwn index 1ae1a7a5..568a9cc0 100644 --- a/hints/assignment_7_hint_4.mdwn +++ b/hints/assignment_7_hint_4.mdwn @@ -46,7 +46,7 @@ Finally, we realize that we're going to have a set of `bool dpm`s to start with, and we need to compose \[[Qx]] with them. We don't want any of the monadic values in the set that wrap `false` to become `true`; instead, we want to apply a filter that checks whether values that formerly wrapped `true` should still continue to do so. - This is most easily done like this: + This could be handled like this: fun entity_dpm -> let eliminate_non_Qxs = fun truth_value -> @@ -99,10 +99,10 @@ which is: - fun truth_value -> + let eliminate_non_Qxs = fun truth_value -> if truth_value then unit_set ( - let eliminate_non_Qxs = fun (r, h) -> + fun (r, h) -> let obj = List.nth h (r 'x') let (a, r', h') = (obj, r, h) in let u' = (fun e -> unit_dpm (Q e)) a