use same naming as clj solution
This commit is contained in:
parent
406c5906eb
commit
aaf9b54e03
@ -79,8 +79,8 @@ uint64_t part_2(const Grid &grid) {
|
|||||||
using namespace std::ranges;
|
using namespace std::ranges;
|
||||||
auto view = iota_view{start_row, grid.size()};
|
auto view = iota_view{start_row, grid.size()};
|
||||||
std::map<size_t, uint64_t> starting_cols{{start_col, 1}};
|
std::map<size_t, uint64_t> starting_cols{{start_col, 1}};
|
||||||
auto cols = fold_left(view, starting_cols, [&grid](auto acc, auto row) {
|
auto cols = fold_left(view, starting_cols, [&grid](auto cols, auto row) {
|
||||||
return fold_left(acc, std::map<size_t, uint64_t>{},
|
return fold_left(cols, std::map<size_t, uint64_t>{},
|
||||||
[&grid, &row](auto next_cols, auto col_cnt) {
|
[&grid, &row](auto next_cols, auto col_cnt) {
|
||||||
auto [col, cnt] = col_cnt;
|
auto [col, cnt] = col_cnt;
|
||||||
if (at_loc(grid, row, col) == '^') {
|
if (at_loc(grid, row, col) == '^') {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user