[update GenUtil.hs
John Meacham <john@repetae.net>**20060404021527] hunk ./GenUtil.hs 2
---  $Id: GenUtil.hs,v 1.49 2006/03/20 11:37:16 john Exp $
+--  $Id: GenUtil.hs,v 1.50 2006/04/04 02:15:00 john Exp $
hunk ./GenUtil.hs 111
+    concatMapM,
+    on,
+    mapMsnd,
+    mapMfst,
hunk ./GenUtil.hs 166
+on :: (a -> a -> b) -> (c -> a) -> c -> c -> b
+(*) `on` f = \x y -> f x * f y
+
+mapMsnd :: Monad m => (b -> m c) -> [(a,b)] -> m [(a,c)]
+mapMsnd f xs = do
+    let g (a,b) = do
+            c <- f b
+            return (a,c)
+    mapM g xs
+
+mapMfst :: Monad m => (b -> m c) -> [(b,a)] -> m [(c,a)]
+mapMfst f xs = do
+    let g (a,b) = do
+            c <- f a
+            return (c,b)
+    mapM g xs
+