From d89e7f09e7757d569a2d140e4080e9ad8bb0cbdc Mon Sep 17 00:00:00 2001 From: Arity-T Date: Mon, 9 Dec 2024 02:31:17 +0300 Subject: [PATCH] =?UTF-8?q?=D0=98=D0=B7=D0=B1=D0=B0=D0=B2=D0=B8=D0=BB?= =?UTF-8?q?=D1=81=D1=8F=20=D0=BE=D1=82=20do?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- coursework/part1/app/Main.hs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/coursework/part1/app/Main.hs b/coursework/part1/app/Main.hs index 08dbdca..05acfbd 100644 --- a/coursework/part1/app/Main.hs +++ b/coursework/part1/app/Main.hs @@ -3,10 +3,10 @@ module Main (main) where import Lib main :: IO () -main = do - putStrLn "Введите имя файла:" - fileName <- getLine - content <- readFile fileName - let expressions = lines content +main = + putStrLn "Введите имя файла:" >> + getLine >>= \fileName -> + readFile fileName >>= \content -> + let expressions = lines content in putStrLn $ concatMap processExpression expressions \ No newline at end of file