summaryrefslogtreecommitdiff
path: root/lib/ur/list.urs
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adam@chlipala.net>2018-12-14 15:26:21 -0500
committerGravatar Adam Chlipala <adam@chlipala.net>2018-12-14 15:26:21 -0500
commit720e1cb2c84dfd274fcbfd7bf4974a1c110501cb (patch)
tree643890450a4a2231e7aa2971fa73f776943bdc33 /lib/ur/list.urs
parent6d87f78102bba77bc090ca3fb105597d3ce3748f (diff)
List.assocAddSorted
Diffstat (limited to 'lib/ur/list.urs')
-rw-r--r--lib/ur/list.urs3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/ur/list.urs b/lib/ur/list.urs
index c5c279b7..c1d46022 100644
--- a/lib/ur/list.urs
+++ b/lib/ur/list.urs
@@ -109,6 +109,9 @@ val assoc : a ::: Type -> b ::: Type -> eq a -> a -> t (a * b) -> option b
val assocAdd : a ::: Type -> b ::: Type -> eq a -> a -> b -> t (a * b) -> t (a * b)
+val assocAddSorted : a ::: Type -> b ::: Type -> eq a -> ord a -> a -> b -> t (a * b) -> t (a * b)
+(* Assume the list is already sorted in ascending order and maintain that ordering. *)
+
(** Converting records to lists *)
val recToList : a ::: Type -> r ::: {Unit} -> folder r -> $(mapU a r) -> t a