From f5fdaf187797bae4a2dee9dc6c7335362b963a4b Mon Sep 17 00:00:00 2001 From: tommy Date: Mon, 2 Dec 2024 08:17:20 -0500 Subject: [PATCH] Better practice --- day1/day1.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/day1/day1.lua b/day1/day1.lua index 4a51e17..d182e21 100644 --- a/day1/day1.lua +++ b/day1/day1.lua @@ -16,6 +16,8 @@ for Line in File:lines() do table.insert(RightList, tonumber(RightId)) end +File:close() + local function SortFunction(a, b) return a < b end @@ -40,5 +42,3 @@ for _, Distance in next, Distances do end print("Total distance:", TotalDistance) - -File:close()