diff --git a/Ganeti/HTools/Utils.hs b/Ganeti/HTools/Utils.hs index 32d956813014a8d923174a92cc51fa9b8b11f3c6..993b044ade480cd1fd7d51f01b53baae66814b6c 100644 --- a/Ganeti/HTools/Utils.hs +++ b/Ganeti/HTools/Utils.hs @@ -25,6 +25,7 @@ module Ganeti.HTools.Utils ( debug , sepSplit + , fst3 , varianceCoeff , commaJoin , readEitherString @@ -72,6 +73,10 @@ sepSplit sep s commaSplit :: String -> [String] commaSplit = sepSplit ',' +-- | Simple version of 'fst' for a triple +fst3 :: (a, b, c) -> a +fst3 (a, _, _) = a + -- * Mathematical functions -- Simple and slow statistical functions, please replace with better versions