aboutsummaryrefslogtreecommitdiff
path: root/aoc-2022-dotnet/Day01/Program.fs
diff options
context:
space:
mode:
Diffstat (limited to 'aoc-2022-dotnet/Day01/Program.fs')
-rw-r--r--aoc-2022-dotnet/Day01/Program.fs8
1 files changed, 4 insertions, 4 deletions
diff --git a/aoc-2022-dotnet/Day01/Program.fs b/aoc-2022-dotnet/Day01/Program.fs
index 560e770..adcb20e 100644
--- a/aoc-2022-dotnet/Day01/Program.fs
+++ b/aoc-2022-dotnet/Day01/Program.fs
@@ -16,11 +16,11 @@ let topN n xs =
| _ -> [ x ]
Seq.fold
- (fun acc elem ->
+ (fun acc x ->
if List.length acc < n then
- insertSorted elem acc
- elif List.head acc < elem then
- insertSorted elem (List.tail acc)
+ insertSorted x acc
+ elif List.head acc < x then
+ insertSorted x (List.tail acc)
else
acc)
List.empty