From 6eae7024f86197d7d13b1904fe259d5ec4ad5210 Mon Sep 17 00:00:00 2001 From: Ivan Malison Date: Fri, 25 Nov 2016 18:39:27 -0800 Subject: [PATCH] [Xmonad] Rename fork -> forkM --- dotfiles/xmonad/xmonad.hs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/dotfiles/xmonad/xmonad.hs b/dotfiles/xmonad/xmonad.hs index aebd560d..03d982d1 100644 --- a/dotfiles/xmonad/xmonad.hs +++ b/dotfiles/xmonad/xmonad.hs @@ -67,13 +67,14 @@ main = xmonad $ def -- Utility functions fork :: Monad m => (i -> m a) -> (i -> m b) -> i -> m (a, b) -fork a b input = do +forkM :: Monad m => (i -> m a) -> (i -> m b) -> i -> m (a, b) +forkM a b input = do resA <- a input resB <- b input return (resA, resB) tee :: Monad m => (i -> m a) -> (i -> m b) -> i -> m a -tee = (fmap . fmap . fmap) (fmap fst) fork +tee = (fmap . fmap . fmap) (fmap fst) forkM (>>=/) :: Monad m => m a -> (a -> m b) -> m a (>>=/) a = (a >>=) . tee return