From ba55ca80346293badcd98c78a38d687c1c5ecd42 Mon Sep 17 00:00:00 2001 From: John Estabrook Date: Wed, 12 Aug 2026 14:54:41 -0500 Subject: T9231: change option name from recurse to descent The term 'recurse' has other uses; change to the term 'descent', which more aptly describes 'including descendants of a node'. --- src/diff.ml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/diff.ml') diff --git a/src/diff.ml b/src/diff.ml index 6a87d93..80c3654 100644 --- a/src/diff.ml +++ b/src/diff.ml @@ -51,7 +51,7 @@ let update_path path left_opt right_opt = module type Place = sig type t - val diff_func : ?recurse:bool -> string list -> t -> change -> t + val diff_func : ?descent:bool -> string list -> t -> change -> t end module Diff (P: Place) = struct @@ -62,12 +62,12 @@ module Diff (P: Place) = struct | Some _, None -> P.diff_func path res Subtracted | None, Some _ -> P.diff_func path res Added | Some left_node, Some right_node when left_node = right_node -> - P.diff_func ~recurse:true path res Unchanged + P.diff_func ~descent:true path res Unchanged | Some left_node, Some right_node when left_node ^~ right_node -> let values = (data_of right_node).values in P.diff_func path res (Updated values) | Some left_node, Some right_node -> - let ret = P.diff_func ~recurse:false path res Unchanged in + let ret = P.diff_func ~descent:false path res Unchanged in List.fold_left (diff_calc path) ret (opt_zip left_node right_node) let diff (init: P.t) l r = diff_calc [] init (Option.some l, Option.some r) -- cgit v1.2.3