aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomasz Chojnacki <tomaszchojnacki2001@gmail.com>2022-12-03 12:21:32 +0100
committerTomasz Chojnacki <tomaszchojnacki2001@gmail.com>2022-12-03 12:21:32 +0100
commit5e13267baaa454b228bfa9bd7361d2ed0784539f (patch)
tree42c50e61d0d02b67443f6309d6dded95556f7f0f
parenta01f87dd23443566a0aab586363052eaeff9ffd1 (diff)
downloadgleam_aoc2020-5e13267baaa454b228bfa9bd7361d2ed0784539f.tar.gz
gleam_aoc2020-5e13267baaa454b228bfa9bd7361d2ed0784539f.zip
Remove redundant function parameter
-rw-r--r--aoc-2022-dotnet/Day03/Program.fs12
1 files changed, 5 insertions, 7 deletions
diff --git a/aoc-2022-dotnet/Day03/Program.fs b/aoc-2022-dotnet/Day03/Program.fs
index 1bf2235..f62d906 100644
--- a/aoc-2022-dotnet/Day03/Program.fs
+++ b/aoc-2022-dotnet/Day03/Program.fs
@@ -12,9 +12,8 @@ let cutInHalf xs =
let half = Seq.length xs / 2
[ Seq.take half xs; Seq.skip half xs ]
-let solution1 input =
- input
- |> Seq.sumBy (
+let solution1 =
+ Seq.sumBy (
cutInHalf
>> Seq.map Set
>> Set.intersectMany
@@ -22,10 +21,9 @@ let solution1 input =
>> priority
)
-let solution2 input =
- input
- |> Seq.chunkBySize 3
- |> Seq.sumBy (
+let solution2 =
+ Seq.chunkBySize 3
+ >> Seq.sumBy (
Seq.map Set
>> Set.intersectMany
>> Seq.exactlyOne