diff lib/ur/list.urs @ 845:6725d73c3c31

Mark current as effectful; add List functions
author Adam Chlipala <adamc@hcoop.net>
date Tue, 09 Jun 2009 11:12:34 -0400
parents 74a1e3bdf430
children 0d30e6338c65
line wrap: on
line diff
--- a/lib/ur/list.urs	Sun Jun 07 16:45:00 2009 -0400
+++ b/lib/ur/list.urs	Tue Jun 09 11:12:34 2009 -0400
@@ -2,6 +2,8 @@
 
 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 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)