aboutsummaryrefslogtreecommitdiff
path: root/aoc-2022-dotnet/Day12/Program.fs
diff options
context:
space:
mode:
Diffstat (limited to 'aoc-2022-dotnet/Day12/Program.fs')
-rw-r--r--aoc-2022-dotnet/Day12/Program.fs5
1 files changed, 2 insertions, 3 deletions
diff --git a/aoc-2022-dotnet/Day12/Program.fs b/aoc-2022-dotnet/Day12/Program.fs
index 77417c5..7e1a409 100644
--- a/aoc-2022-dotnet/Day12/Program.fs
+++ b/aoc-2022-dotnet/Day12/Program.fs
@@ -72,11 +72,10 @@ let solution distanceCalculation =
>> Util.mapEachToSeq (fun matrix pos square ->
(square,
Vec2.neighbours4 pos
- |> Seq.filter (fun np ->
+ |> Set.filter (fun np ->
Vec2.inMatrix matrix np
&& Square.canTraverse square (Util.mAt matrix np))
- |> Seq.map (Vec2.toIndexOf matrix)
- |> Set))
+ |> Set.map (Vec2.toIndexOf matrix)))
>> Seq.indexed
>> Map.ofSeq
>> Graph