diff options
author | Tomasz Chojnacki <tomaszchojnacki2001@gmail.com> | 2022-12-07 14:23:47 +0100 |
---|---|---|
committer | Tomasz Chojnacki <tomaszchojnacki2001@gmail.com> | 2022-12-07 14:23:47 +0100 |
commit | 8d9513e9df67c5ec0abc2d94152f350274233643 (patch) | |
tree | 926d8e378c7534baddf76800971762b1a2c2cea0 /aoc-2022-dotnet/Day04/Program.fs | |
parent | bea11616e6b3c26b14534feb87317619009236d1 (diff) | |
download | gleam_aoc2020-8d9513e9df67c5ec0abc2d94152f350274233643.tar.gz gleam_aoc2020-8d9513e9df67c5ec0abc2d94152f350274233643.zip |
Refactor earlier solutions
Diffstat (limited to 'aoc-2022-dotnet/Day04/Program.fs')
-rw-r--r-- | aoc-2022-dotnet/Day04/Program.fs | 5 |
1 files changed, 1 insertions, 4 deletions
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) |