From a80bf544154b056030ce80d23700763f52c08845 Mon Sep 17 00:00:00 2001 From: Iustin Pop <iustin@google.com> Date: Mon, 1 Jun 2009 15:48:18 +0200 Subject: [PATCH] Add an utility function for triples --- Ganeti/HTools/Utils.hs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Ganeti/HTools/Utils.hs b/Ganeti/HTools/Utils.hs index 32d956813..993b044ad 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 -- GitLab