diff options
Diffstat (limited to 'aoc-2020-gleam/src/days/day03.gleam')
-rw-r--r-- | aoc-2020-gleam/src/days/day03.gleam | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/aoc-2020-gleam/src/days/day03.gleam b/aoc-2020-gleam/src/days/day03.gleam index e4cecda..4c1ef59 100644 --- a/aoc-2020-gleam/src/days/day03.gleam +++ b/aoc-2020-gleam/src/days/day03.gleam @@ -5,6 +5,7 @@ import gleam/string as str import gleam/function as fun import gleam/iterator as iter import gleam/set.{Set} +import ext/intx import ext/resultx as resx import ext/iteratorx as iterx import util/input_util @@ -62,7 +63,7 @@ fn has_tree(in area: Area, at pos: Pos) -> Bool { } fn is_valid(pos: Pos, in area: Area) -> Bool { - 0 <= pos.1 && pos.1 < area.height + intx.is_between(pos.1, 0, and: area.height - 1) } fn tree_count(in area: Area, with slope: Pos) -> Int { |