diff lib/ur/monad.ur @ 917:321a2d6feb40

dragList demo working, save for Gecko load delay and highlighting
author Adam Chlipala <adamc@hcoop.net>
date Tue, 08 Sep 2009 10:55:49 -0400
parents 8e540df3294d
children 37dd42935dad
line wrap: on
line diff
--- a/lib/ur/monad.ur	Tue Sep 08 10:18:19 2009 -0400
+++ b/lib/ur/monad.ur	Tue Sep 08 10:55:49 2009 -0400
@@ -8,6 +8,10 @@
 
 fun ignore [m ::: Type -> Type] (_ : monad m) [t] (v : m t) = x <- v; return ()
 
+fun mp [m] (_ : monad m) [a] [b] f m =
+    v <- m;
+    return (f v)
+
 fun foldR [K] [m] (_ : monad m) [tf :: K -> Type] [tr :: {K} -> Type]
           (f : nm :: Name -> t :: K -> rest :: {K}
                -> [[nm] ~ rest] =>