diff options
author | Son Ho | 2021-11-23 09:54:03 +0100 |
---|---|---|
committer | Son Ho | 2021-11-23 09:54:03 +0100 |
commit | 8f5e7a5c4fc4d8f87ece33809ad9e21f2199f426 (patch) | |
tree | a524f709c4b44b76fbbe3f23b9b0a038661705e6 /src/Identifiers.ml | |
parent | d145f46b141a8d7cc66372693bc68691af34c8cf (diff) |
Cleanup a bit
Diffstat (limited to 'src/Identifiers.ml')
-rw-r--r-- | src/Identifiers.ml | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/Identifiers.ml b/src/Identifiers.ml index e75099d6..9b125161 100644 --- a/src/Identifiers.ml +++ b/src/Identifiers.ml @@ -23,6 +23,8 @@ module type Id = sig val vector_of_list : 'a list -> 'a vector + val nth : 'a vector -> id -> 'a + val nth_opt : 'a vector -> id -> 'a option val update_nth : 'a vector -> id -> 'a -> 'a vector @@ -65,6 +67,8 @@ module IdGen () : Id = struct let vector_of_list v = v + let nth v id = List.nth v id + let nth_opt v id = List.nth_opt v id let rec update_nth vec id v = |