From cd571888d6dd73045c324e9fdf133bfef9ddb3ca Mon Sep 17 00:00:00 2001 From: Determinant Date: Mon, 19 Jun 2017 14:55:32 -0400 Subject: replace foldl with foldl' --- 90-94/92.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/90-94/92.hs b/90-94/92.hs index 0f6f7a0..1d04f22 100644 --- a/90-94/92.hs +++ b/90-94/92.hs @@ -1,4 +1,4 @@ -import Data.List (sortBy) +import Data.List (sortBy, foldl') import Data.Ord (comparing) vonKoch :: [(Int, Int)] -> [[(Int, Int)]] @@ -10,7 +10,7 @@ vonKoch edges = koch (reverse adj) [] [] [] | x <- [1..maxvn], x `notElem` vused, let en = map (abs . (x-)) (map (findn vplan) us), - let (eused', f) = foldl (\(l, f) d -> + let (eused', f) = foldl' (\(l, f) d -> (d:l, f && d `notElem` l && 1 <= d && d <= maxen)) (eused, True) en, f] -- cgit v1.2.3-70-g09d2