I currently use a data structure like this:
(def sample-board
[[{:mine true} {:warn 2 } {:warn 1} { }]
[{:warn 2 } {:mine true} {:warn 1} { }]
[{:warn 1 } {:warn 1 } {:warn 2} {:warn 1 }]
[{ } { } {:warn 1} {:mine true}]])
Now I want to create a copy of the first structure and each element should be supplemented with :explored true.
My approach so far looks like this:
(def sample-board-solved
(map (partial map
(partial conj {:explored true}))
sample-board))
I don't find the approach very appealing though. I thought about using for instead or maybe recur in combination with update-in but I did not bring it to work yet.
I'd be glad on suggestions how to improve the code.