remove redundant accumulator
This commit is contained in:
1 file changed
+3
-3
@@ -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
|
||||||
Reference in new issue
Block a user