summaryrefslogtreecommitdiff
path: root/src/Utility/Tuple.hs
diff options
context:
space:
mode:
authorJoey Hess <joeyh@joeyh.name>2017-05-20 09:28:22 -0400
committerJoey Hess <joeyh@joeyh.name>2017-05-20 09:28:22 -0400
commit24e789a2ac981b3d4b2dfaf1af359c4407587a00 (patch)
treee676038cd69b8ff91efc3b7b5a85e63aad5214d4 /src/Utility/Tuple.hs
parentd499d8d668fa8ec32833edb4b7a5677dcbf75c56 (diff)
parent3dd36f7e922b0dfdde54420a931e77fd02e6b83c (diff)
Merge branch 'joeyconfig' of ssh://propellor.branchable.com into joeyconfig
Diffstat (limited to 'src/Utility/Tuple.hs')
-rw-r--r--src/Utility/Tuple.hs17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/Utility/Tuple.hs b/src/Utility/Tuple.hs
new file mode 100644
index 00000000..25c6e8f3
--- /dev/null
+++ b/src/Utility/Tuple.hs
@@ -0,0 +1,17 @@
+{- tuple utility functions
+ -
+ - Copyright 2017 Joey Hess <id@joeyh.name>
+ -
+ - License: BSD-2-clause
+ -}
+
+module Utility.Tuple where
+
+fst3 :: (a,b,c) -> a
+fst3 (a,_,_) = a
+
+snd3 :: (a,b,c) -> b
+snd3 (_,b,_) = b
+
+thd3 :: (a,b,c) -> c
+thd3 (_,_,c) = c