X-Git-Url: http://lambda.jimpryor.net/git/gitweb.cgi?p=lambda.git;a=blobdiff_plain;f=hints%2Fassignment_7_hint_6.mdwn;h=e513284bd51d31b5eab302b3ab669e44957bf12f;hp=38f6c2e09b38449cd7bdda53b8aeb7c8c6a6b9a9;hb=0feebbaaa58403d836d7ea6166cf709dd3faf1a8;hpb=767dc2f1f56176d59b16840613d6c0b170a229f3 diff --git a/hints/assignment_7_hint_6.mdwn b/hints/assignment_7_hint_6.mdwn index 38f6c2e0..e513284b 100644 --- a/hints/assignment_7_hint_6.mdwn +++ b/hints/assignment_7_hint_6.mdwn @@ -20,14 +20,14 @@ (* if one_dpm isn't already false at (r, h), we want to check its behavior when updated with phi bind_set (unit_set one_dpm) phi === phi one_dpm; do you remember why? *) - let (truth_value, _, _) = one_dpm (r, h) + let (truth_value, r', h') = one_dpm (r, h) in let truth_value' = truth_value && (truths (phi one_dpm) (r, h) = []) (* new_dpm must return a (bool, r, h) *) - in (truth_value', r, h) + in (truth_value', r', h') in unit_set new_dpm;; - **Note: Simon pointed out a subtle error in this code, which we will look into fixing. At the moment, the subtle error is still there.** + **Thanks to Simon Charlow** for catching a subtle error in previous versions of this function. Fixed 1 Dec. * Representing \[[and φ ψ]] is simple: @@ -38,6 +38,8 @@ * Here are `or` and `if`: + (These probably still manifest the bug Simon spotted.) + let or_op (phi : clause) (psi : clause) = fun one_dpm -> unit_set ( fun (r, h) ->