summaryrefslogtreecommitdiff
path: root/src/GF/Data/Operations.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/GF/Data/Operations.hs')
-rw-r--r--src/GF/Data/Operations.hs5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/GF/Data/Operations.hs b/src/GF/Data/Operations.hs
index 9bed80392..024318594 100644
--- a/src/GF/Data/Operations.hs
+++ b/src/GF/Data/Operations.hs
@@ -15,7 +15,10 @@ infixl 9 !?
ifNull :: b -> ([a] -> b) -> [a] -> b
ifNull b f xs = if null xs then b else f xs
-
+
+onSnd :: (a -> b) -> (c,a) -> (c,b)
+onSnd f (x, y) = (x, f y)
+
-- the Error monad
data Err a = Ok a | Bad String -- like Maybe type with error msgs