From: jim Date: Tue, 24 Mar 2015 13:12:24 +0000 (-0400) Subject: whoops, tree_best_sofar (direct) had a bug X-Git-Url: http://lambda.jimpryor.net/git/gitweb.cgi?p=lambda.git;a=commitdiff_plain;h=346405d4f6439e7a87409572ba46b84c8628d5c0 whoops, tree_best_sofar (direct) had a bug --- diff --git a/exercises/assignment5_answers.mdwn b/exercises/assignment5_answers.mdwn index 0cdfa612..1780b0aa 100644 --- a/exercises/assignment5_answers.mdwn +++ b/exercises/assignment5_answers.mdwn @@ -263,7 +263,7 @@ Choose one of these languages and write the following functions. let rec tree_best_sofar (t : 'a color_tree) (lead : maybe_leader) : maybe_leader * int = match t with - | Leaf a -> (None, a) + | Leaf a -> (lead, a) | Branch(l, col, r) -> let (lead',left_score) = tree_best_sofar l lead in let (lead'',right_score) = tree_best_sofar r lead' in