From f93207d35de49a6a0d0b63a3ad5cf38c6f521d52 Mon Sep 17 00:00:00 2001 From: Eric Mertens Date: Mon, 18 Dec 2023 10:56:35 -0800 Subject: [PATCH] whitespace --- solutions/src/2023/18.hs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/solutions/src/2023/18.hs b/solutions/src/2023/18.hs index b01c99a..aba027b 100644 --- a/solutions/src/2023/18.hs +++ b/solutions/src/2023/18.hs @@ -67,11 +67,11 @@ area input = abs (polyareaRect path) + perimeter `quot` 2 + 1 -- | Convert the input character to a unit vector. asUnitVec :: Char -> Coord -asUnitVec = \case +asUnitVec = \case '0' -> east ; 'R' -> east - '1' -> south; 'D' -> south - '2' -> west ; 'L' -> west - '3' -> north; 'U' -> north + '1' -> south; 'D' -> south + '2' -> west ; 'L' -> west + '3' -> north; 'U' -> north _ -> error "bad direction digit" -- | Area of a polygon using Shoelace formula