From 8d9513e9df67c5ec0abc2d94152f350274233643 Mon Sep 17 00:00:00 2001 From: Tomasz Chojnacki Date: Wed, 7 Dec 2022 14:23:47 +0100 Subject: Refactor earlier solutions --- aoc-2022-dotnet/Day04/Program.fs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'aoc-2022-dotnet/Day04/Program.fs') diff --git a/aoc-2022-dotnet/Day04/Program.fs b/aoc-2022-dotnet/Day04/Program.fs index 25cc3b6..2221a4a 100644 --- a/aoc-2022-dotnet/Day04/Program.fs +++ b/aoc-2022-dotnet/Day04/Program.fs @@ -6,10 +6,7 @@ open FParsec let parseLine line = let prange = pint32 .>> pstring "-" .>>. pint32 let ppair = prange .>> pstring "," .>>. prange .>> eof - - match run ppair line with - | Success (result, _, _) -> result - | _ -> failwith "Invalid line format!" + Common.parse ppair line let fullyOverlap ((a, b), (c, d)) = (a <= c && d <= b) || (c <= a && b <= d) -- cgit v1.2.3