remove redundant accumulator

This commit is contained in:
SowinskiBraeden committed 2026-02-13 09:39:05 -08:00
1 parent 527594563f
commit 063b00853d
1 file changed
+3 -3
+3 -3
View File
@@ -129,12 +129,12 @@ module Make(Ord: OrderedType) = struct
* key-value pair to a string, and applies that to all * key-value pair to a string, and applies that to all
* key-value pairs in a given tree [t]. *) * key-value pairs in a given tree [t]. *)
let to_string f t = let to_string f t =
let rec aux acc t = let rec aux t =
match t with match t with
| L -> "#" | L -> "#"
| N (k, v, l, r) -> | 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 in
aux "" t;; aux t;;
end end