diff options
author | 2012-05-19 11:32:12 -0400 | |
---|---|---|
committer | 2012-05-19 11:32:12 -0400 | |
commit | a4bcc72f9e763e49b3ffefff09b1fe8924e440e1 (patch) | |
tree | 04d2d95798a412261154293e71323e4069718bf6 /lib/ur/monad.urs | |
parent | 2be1e51f8036b1b473553d16f11ca63b068146ad (diff) |
Some standard library additions from Edward Z. Yang
Diffstat (limited to 'lib/ur/monad.urs')
-rw-r--r-- | lib/ur/monad.urs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/ur/monad.urs b/lib/ur/monad.urs index d07d5026..ce823f4a 100644 --- a/lib/ur/monad.urs +++ b/lib/ur/monad.urs @@ -7,6 +7,13 @@ val ignore : m ::: (Type -> Type) -> monad m -> t ::: Type val mp : m ::: (Type -> Type) -> monad m -> a ::: Type -> b ::: Type -> (a -> b) -> m a -> m b +val liftM : m ::: (Type -> Type) -> monad m -> a ::: Type -> b ::: Type + -> (a -> b) -> m a -> m b +(* Haskell-style synonym for [mp] *) + +val liftM2 : m ::: (Type -> Type) -> monad m -> a ::: Type -> b ::: Type -> c ::: Type + -> (a -> b -> c) -> m a -> m b -> m c + val foldR : K --> m ::: (Type -> Type) -> monad m -> tf :: (K -> Type) -> tr :: ({K} -> Type) |