diff options
Diffstat (limited to 'aoc2023/src/utilities/array2d.gleam')
-rw-r--r-- | aoc2023/src/utilities/array2d.gleam | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/aoc2023/src/utilities/array2d.gleam b/aoc2023/src/utilities/array2d.gleam index 1ad824c..d7d05f8 100644 --- a/aoc2023/src/utilities/array2d.gleam +++ b/aoc2023/src/utilities/array2d.gleam @@ -3,7 +3,7 @@ import gleam/dict.{type Dict} import gleam/string pub type Posn { - Posn(x: Int, y: Int) + Posn(r: Int, c: Int) } pub type Array2D(a) = @@ -11,9 +11,9 @@ pub type Array2D(a) = pub fn to_2d_array(xss: List(List(a))) -> Array2D(a) { { - use x, row <- list.index_map(xss) - use y, cell <- list.index_map(row) - #(Posn(x, y), cell) + use r, row <- list.index_map(xss) + use c, cell <- list.index_map(row) + #(Posn(r, c), cell) } |> list.flatten |> dict.from_list |