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/Common/Common.fsproj | 16 ++++++++++++++++ aoc-2022-dotnet/Common/Library.fs | 8 ++++++++ 2 files changed, 24 insertions(+) create mode 100644 aoc-2022-dotnet/Common/Common.fsproj create mode 100644 aoc-2022-dotnet/Common/Library.fs (limited to 'aoc-2022-dotnet/Common') diff --git a/aoc-2022-dotnet/Common/Common.fsproj b/aoc-2022-dotnet/Common/Common.fsproj new file mode 100644 index 0000000..c8a185a --- /dev/null +++ b/aoc-2022-dotnet/Common/Common.fsproj @@ -0,0 +1,16 @@ + + + + net7.0 + true + + + + + + + + + + + diff --git a/aoc-2022-dotnet/Common/Library.fs b/aoc-2022-dotnet/Common/Library.fs new file mode 100644 index 0000000..7354509 --- /dev/null +++ b/aoc-2022-dotnet/Common/Library.fs @@ -0,0 +1,8 @@ +module Common + +open FParsec + +let parse parser input = + match run parser input with + | Success (result, _, _) -> result + | _ -> failwith "Invalid input format!" -- cgit v1.2.3