Summary Files Commits Branches @commit @diff @stats
path: root / Year 2 / Functional Programming / hw3.hs
diff options
context:
space:
mode:
1 files changed, 3 insertions, 3 deletions
-rw-r--r--Year 2/Functional Programming/hw3.hs6
diff --git a/Year 2/Functional Programming/hw3.hs b/Year 2/Functional Programming/hw3.hs
index 3192d90..446c83c 100644
--- a/Year 2/Functional Programming/hw3.hs
+++ b/Year 2/Functional Programming/hw3.hs
@@ -38,7 +38,7 @@ countUniques inpt = length (filter (\v -> elem v [2, 3, 4, 7]) (map length (drop
main :: IO()
main = do
- print(generate [10, 15, 25, 35] [1, 5, 20, 30, 40])
- print(countUniques "be cfbegad cbdgef fgaecd cgeb fdcge agebfd fecdb fabcd edb | fdgacbe cefdb cefbgd gcbe")
-
+ print(generate [10, 15, 25, 35] [1, 5, 20, 30, 40])
+ inpt <- readFile "input.txt"
+ print(foldr (\el accum -> accum + (countUniques el)) 0 (lines inpt))