From c9cbb22339a2ae04e0af5b7a557b1c04c50b5b47 Mon Sep 17 00:00:00 2001 From: vsedov Date: Mon, 2 Dec 2024 14:39:48 +0000 Subject: [PATCH] Remove repeating code --- src/aoc/aoc2024/day_02.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/aoc/aoc2024/day_02.py b/src/aoc/aoc2024/day_02.py index cf70ff8..3333bbb 100644 --- a/src/aoc/aoc2024/day_02.py +++ b/src/aoc/aoc2024/day_02.py @@ -8,9 +8,6 @@ Nums: TypeAlias = Iterable[int] -Nums: TypeAlias = Iterable[int] - - def safe(nums: Nums, /) -> bool: match [b - a for a, b in pairwise(nums)]: case [*diffs] if all(d in {1, 2, 3} for d in diffs) or all(