aboutsummaryrefslogtreecommitdiff
path: root/script.it/outline.ml
diff options
context:
space:
mode:
authorSébastien Dailly <sebastien@chimrod.com>2021-01-12 13:41:00 +0100
committerSébastien Dailly <sebastien@chimrod.com>2021-01-12 14:07:56 +0100
commit228eceeed40b0f86e75a394fe8d65e6e93ca2370 (patch)
tree1409c2d9aa6924a35464e30af78e7281502ab36e /script.it/outline.ml
parent1aa90219e3e74bac3afbde0ec120e098b50bd0c5 (diff)
Move path, some refactoring
Diffstat (limited to 'script.it/outline.ml')
-rwxr-xr-xscript.it/outline.ml9
1 files changed, 9 insertions, 0 deletions
diff --git a/script.it/outline.ml b/script.it/outline.ml
index 0dbecd0..1df7588 100755
--- a/script.it/outline.ml
+++ b/script.it/outline.ml
@@ -1,3 +1,5 @@
+open StdLabels
+
let internal_path_id = ref 0
type t =
@@ -10,3 +12,10 @@ let get_id () =
let id = !internal_path_id in
incr internal_path_id;
id
+
+let find
+ : t list -> int -> t option
+ = fun ts id ->
+ List.find_opt
+ ts
+ ~f:(fun p -> p.id = id)