aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/ur/list.urs
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adamc@hcoop.net>2009-06-09 11:12:34 -0400
committerGravatar Adam Chlipala <adamc@hcoop.net>2009-06-09 11:12:34 -0400
commit4c8297c1f381599333e998da585f4ef5ac24383b (patch)
treeafab9c1f2b021be1afaaac75f504977531d52f6b /lib/ur/list.urs
parent005fbe2dd67c6ec77282179032f94ffa6cb7788c (diff)
Mark current as effectful; add List functions
Diffstat (limited to 'lib/ur/list.urs')
-rw-r--r--lib/ur/list.urs11
1 files changed, 9 insertions, 2 deletions
diff --git a/lib/ur/list.urs b/lib/ur/list.urs
index 7906970a..daf81074 100644
--- a/lib/ur/list.urs
+++ b/lib/ur/list.urs
@@ -2,6 +2,8 @@ datatype t = datatype Basis.list
val show : a ::: Type -> show a -> show (list a)
+val foldl : a ::: Type -> b ::: Type -> (a -> b -> b) -> b -> t a -> b
+
val rev : a ::: Type -> t a -> t a
val revAppend : a ::: Type -> t a -> t a -> t a
@@ -30,11 +32,16 @@ val foldlM : m ::: (Type -> Type) -> monad m -> a ::: Type -> b ::: Type
val foldlMap : a ::: Type -> b ::: Type -> c ::: Type
-> (a -> b -> c * b) -> b -> t a -> t c * b
-val assoc : a ::: Type -> b ::: Type -> eq a -> a -> t (a * b) -> option b
-
val search : a ::: Type -> b ::: Type -> (a -> option b) -> t a -> option b
val all : a ::: Type -> (a -> bool) -> t a -> bool
val app : m ::: (Type -> Type) -> monad m -> a ::: Type
-> (a -> m unit) -> t a -> m unit
+
+
+(** Association lists *)
+
+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)