From 858b0cbc8800d695ddd3797d5eccd9a4205ecc5d Mon Sep 17 00:00:00 2001 From: Matthias Wisniowski Date: Tue, 8 May 2012 09:50:20 +0200 Subject: Comments, shorter tests --- AufgabeFFP5.hs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'AufgabeFFP5.hs') diff --git a/AufgabeFFP5.hs b/AufgabeFFP5.hs index 3fb926c..78ed0fe 100644 --- a/AufgabeFFP5.hs +++ b/AufgabeFFP5.hs @@ -41,7 +41,7 @@ compAS a t (i,j) | i Table Int (Int, Int) asTbl a = dynamic (compAS a) (bndsAS a) @@ -59,10 +59,10 @@ mas a = tblMax $ asTbl a -- all indices where the value equals to the maximum distance-sum amas :: Array Int Int -> [(Int, Int)] -amas a = [(i,j) | ((i,j),v) <- (assocs array), i<=j, v>=m] +amas a = [(i,j) | ((i,j),v) <- (assocs array), i<=j, v>=maxAS] where t@(Tbl array) = asTbl a - m = tblMax t + maxAS = tblMax t ------------------------------------------------------------------------------- -- 3. -- cgit v1.2.3