diff options
author | Sébastien Dailly <sebastien@chimrod.com> | 2021-01-12 13:41:00 +0100 |
---|---|---|
committer | Sébastien Dailly <sebastien@chimrod.com> | 2021-01-12 14:07:56 +0100 |
commit | 228eceeed40b0f86e75a394fe8d65e6e93ca2370 (patch) | |
tree | 1409c2d9aa6924a35464e30af78e7281502ab36e /script.it/outline.ml | |
parent | 1aa90219e3e74bac3afbde0ec120e098b50bd0c5 (diff) |
Move path, some refactoring
Diffstat (limited to 'script.it/outline.ml')
-rwxr-xr-x | script.it/outline.ml | 9 |
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) |