aboutsummaryrefslogtreecommitdiff
path: root/2024/22/puzzles.py
diff options
context:
space:
mode:
authorThomas Voss <mail@thomasvoss.com> 2024-12-22 19:55:32 +0100
committerThomas Voss <mail@thomasvoss.com> 2024-12-22 19:55:32 +0100
commitf6b7a1fb011a3dae5de7eefd3b7c3d41e6a0957c (patch)
treee049d8b60d6d1a4ba6b618661f849e09c1869f14 /2024/22/puzzles.py
parenta82498c4141728069d80418e26196193c451a1cd (diff)
Rename functionHEADmaster
Diffstat (limited to '2024/22/puzzles.py')
-rw-r--r--2024/22/puzzles.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/2024/22/puzzles.py b/2024/22/puzzles.py
index dff825f..aa62086 100644
--- a/2024/22/puzzles.py
+++ b/2024/22/puzzles.py
@@ -12,7 +12,7 @@ def main() -> None:
xs = map(int, f.readlines())
# START PART 1
- print(sum(map(lastfrom, map(secrets, xs))))
+ print(sum(map(takelast, map(secrets, xs))))
# END PART 1 START PART 2
sums = collections.defaultdict(int)
for x in xs:
@@ -51,7 +51,7 @@ def lastdigit(n: int) -> int:
return n % 10
-def lastfrom[T](xs: Iterable[T]) -> T:
+def takelast[T](xs: Iterable[T]) -> T:
*_, x = xs
return x