
2 Jun
2010
2 Jun
'10
7:21 a.m.
if you associate positions to pieces, you can omit "Maybe" and simple delete positions without pieces from the Map. So your Map will only have 32 entries or fewer.
Yep, good point. The same is true for Data.Map, too.
Furthermore, you could code your row and column positions (r, c) as a single Int p and use Data.IntMap.IntMap Piece.
Also true. I think that would really be overkill for a chessboard, though. Unless perhaps you're trying to build "Big Blue" in Haskell. Regards, Yitz