From 59e092226396ce15f00a9b9c73771de4547a44f4 Mon Sep 17 00:00:00 2001 From: Neil Brown Date: Mon, 2 Jun 2008 14:09:33 +0000 Subject: [PATCH] Added a new operator to Utils (>.>, the flipped version of <.<) --- common/Utils.hs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/common/Utils.hs b/common/Utils.hs index 8046a35..1dc4e05 100644 --- a/common/Utils.hs +++ b/common/Utils.hs @@ -198,6 +198,9 @@ liftF f x = lift (f x) (<.<) :: Monad m => (b -> m c) -> (a -> m b) -> (a -> m c) (<.<) f1 f0 x = f0 x >>= f1 +-- | The <.< operator, flipped +(>.>) :: Monad m => (a -> m b) -> (b -> m c) -> (a -> m c) +(>.>) = flip (<.<) -- | A size 3 version of the standard uncurry function. uncurry3 :: (a -> b -> c -> d) -> (a,b,c) -> d