summaryrefslogtreecommitdiff
path: root/tree.sig
diff options
context:
space:
mode:
authorVladimir Azarov <avm@intermediate-node.net>2025-05-18 14:17:50 +0200
committerVladimir Azarov <avm@intermediate-node.net>2025-05-18 14:17:50 +0200
commitd289f01594024a8fe64aeed56721260fab6b4e50 (patch)
tree204b160e1fb1d3325cc493db1d84b351dfb621a6 /tree.sig
parent183a4420d2f2a985dd26d76e63c2cdcaafedc5ad (diff)
#else, #elif (rudimentary) support
Diffstat (limited to 'tree.sig')
-rw-r--r--tree.sig5
1 files changed, 3 insertions, 2 deletions
diff --git a/tree.sig b/tree.sig
index afab259..8caf4cc 100644
--- a/tree.sig
+++ b/tree.sig
@@ -1,10 +1,11 @@
signature TREE = sig
type ('k, 'v) t
- exception Exists
val empty: ('k, 'v) t
- val insert: ('k -> 'k -> order) -> ('k, 'v) t -> 'k -> 'v -> ('k, 'v) t
+ val insert: ('k -> 'k -> order) -> ('k, 'v) t -> 'k -> 'v
+ -> 'v option * ('k, 'v) t
+
val lookup: ('k -> 'k -> order) -> ('k, 'v) t -> 'k -> 'v option
val lookup2: ('k -> 'k -> order) -> ('k, 'v) t -> 'k ->
('v -> 'v option * 'a) * 'a -> 'a * ('k, 'v) t