From 063b00853dd30e1a2241c53814879c8e6266de0d Mon Sep 17 00:00:00 2001 From: SowinskiBraeden Date: Fri, 13 Feb 2026 09:39:05 -0800 Subject: [PATCH] remove redundant accumulator --- lab05/kvtree/kvtree.ml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lab05/kvtree/kvtree.ml b/lab05/kvtree/kvtree.ml index 4b048ca..d3ce24b 100644 --- a/lab05/kvtree/kvtree.ml +++ b/lab05/kvtree/kvtree.ml @@ -129,12 +129,12 @@ module Make(Ord: OrderedType) = struct * key-value pair to a string, and applies that to all * key-value pairs in a given tree [t]. *) let to_string f t = - let rec aux acc t = + let rec aux t = match t with | L -> "#" | N (k, v, l, r) -> - Printf.sprintf "^(%s, %s, %s)" (f (k, v)) (aux acc l) (aux acc r) + Printf.sprintf "^(%s, %s, %s)" (f (k, v)) (aux l) (aux r) in - aux "" t;; + aux t;; end