From b29e31d614588e9758717a3f4b097925c0a4fe5f Mon Sep 17 00:00:00 2001 From: Gattix Date: Thu, 8 Dec 2022 23:00:15 +0100 Subject: [PATCH] day7: remove now superfluous list comprehension --- 2022/day07/day07.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/2022/day07/day07.hs b/2022/day07/day07.hs index 2074174..4cb33c9 100644 --- a/2022/day07/day07.hs +++ b/2022/day07/day07.hs @@ -47,7 +47,7 @@ walk _ z = z getDirSize :: IZipper -> Int -getDirSize ((Folder _ nodes),_) = sum [getSize node | node<-nodes] +getDirSize ((Folder _ nodes),_) = sum $ map getSize nodes where getSize (File _ size) = size getSize folder = getDirSize (folder,[]) getDirSize _ = 0