aboutsummaryrefslogtreecommitdiff
path: root/Utils.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Utils.hs')
-rw-r--r--Utils.hs4
1 files changed, 4 insertions, 0 deletions
diff --git a/Utils.hs b/Utils.hs
index 2650d2e..c609262 100644
--- a/Utils.hs
+++ b/Utils.hs
@@ -16,3 +16,7 @@ just err Nothing = error ("Missing: " ++ err)
-- | Test for whether something listy has a suffix
hasSuffix :: Eq a => [a] -> [a] -> Bool
hasSuffix s = isJust . stripSuffix s
+
+-- | The same second as from arrows et al.
+second :: (a -> b) -> (c, a) -> (c, b)
+second f (a, b) = (a, f b)