From 6a75fb043ed30389fff1ce97fe20ee56b1c95066 Mon Sep 17 00:00:00 2001 From: Sébastien Dailly Date: Tue, 25 May 2021 11:08:00 +0200 Subject: Update script.it project --- script.it/script_event/complete_path.ml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100755 script.it/script_event/complete_path.ml (limited to 'script.it/script_event/complete_path.ml') diff --git a/script.it/script_event/complete_path.ml b/script.it/script_event/complete_path.ml new file mode 100755 index 0000000..99dd6ae --- /dev/null +++ b/script.it/script_event/complete_path.ml @@ -0,0 +1,14 @@ +open StdLabels +module State = Script_state.State + +type t = Outline.t + +let update newPath state = + let paths = List.map + state.State.paths + ~f:(fun line -> + match Outline.(newPath.id = line.id) with + | true -> newPath + | false -> line) in + { state with paths } + -- cgit v1.2.3