The theme itself looks interesting to me. I had some sketches about how it can work in the past.
I re-formatted the code as it is recommended and as I do (so I was able to read and understand).
I also remade all equation-style functions into a case ... of ones for simplifying future refactoring.
I made applyAt traverse the list once.
Other small changes: intercalate "\n" == unlines, the loadBoardFromText inner loadBoard became a foldl, some expressions turned into zip as bs 'for' \(a, b) -> c where for = flip map.
I didn't touch main domain algorithms, it hard to reason what is/should be done there.
The code looked as you used the tab button. Tab is a no-no, please, don't use it.
The theme itself looks interesting to me. I had some sketches about how it can work in the past.
I re-formatted the code as it is recommended and as I do (so I was able to read and understand).
I also remade all equation-style functions into a
case ... of
ones for simplifying future refactoring.I made
applyAt
traverse the list once.Other small changes:
intercalate "\n"
==unlines
, theloadBoardFromText
innerloadBoard
became afoldl
, some expressions turned intozip as bs 'for' \(a, b) -> c
wherefor = flip map
.I didn't touch main domain algorithms, it hard to reason what is/should be done there.
The code looked as you used the tab button. Tab is a no-no, please, don't use it.