From c4860e60b7d6e12e6dbfc402be216ec40734ba72 Mon Sep 17 00:00:00 2001 From: VegOwOtenks Date: Fri, 18 Oct 2024 10:00:54 +0200 Subject: [PATCH] Changed the separator character '#' --- app/Main.hs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/Main.hs b/app/Main.hs index a6269da..88e9654 100644 --- a/app/Main.hs +++ b/app/Main.hs @@ -28,13 +28,13 @@ parseInputLine :: Int -> String -> Either ParseError Expression parseInputLine n s = parseFullString ("stdin:" ++ show n) s title :: [String] -> String -title ns = " " ++ intercalate " | " ns +title ns = " " ++ intercalate " # " ns header :: [Int] -> String -header ws = intercalate "|" . map (flip replicate '-' . (+2) ) $ ws +header ws = intercalate "#" . map (flip replicate '#' . (+2) ) $ ws row :: [Int] -> [Bool] -> String -row ws rs = intercalate "|" $ (zipWith row' ws rs) +row ws rs = intercalate "#" $ (zipWith row' ws rs) where row' :: Int -> Bool -> String row' w b = replicate (left+1) ' ' ++ (if b then "1" else "0") ++ replicate (right+1) ' '