diff options
author | HJ <thechairman@thechairman.info> | 2023-12-16 10:42:12 -0500 |
---|---|---|
committer | HJ <thechairman@thechairman.info> | 2023-12-16 10:42:12 -0500 |
commit | 66ef0cabda52a27ebd52411f6d1fa1b8ac0ec9da (patch) | |
tree | 87e8b8c2e0f8fff554dc6c08ea3749902a7edcae /aoc2023/src/utilities/array2d.gleam | |
parent | c92cd5ba942286f90a75c4121e0035e078def2fe (diff) | |
download | gleam_aoc-66ef0cabda52a27ebd52411f6d1fa1b8ac0ec9da.tar.gz gleam_aoc-66ef0cabda52a27ebd52411f6d1fa1b8ac0ec9da.zip |
day 16 complete
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 |