Flipping bits game: Difference between revisions
m
→{{header|Haskell}}: (Slightly reordered imports, for legibility)
(→{{header|Haskell}}: Specified imports, applied hlint, hindent) |
m (→{{header|Haskell}}: (Slightly reordered imports, for legibility)) |
||
Line 1,264:
=={{header|Haskell}}==
Maximum game size is 9x9 because the array indices are the characters 1 until 9.
<lang Haskell>import Data.
import
import
import Control.Monad (zipWithM_, replicateM, foldM, when)
type Board = Array (Char, Char) Int
Line 1,284:
numCols t =
let ((_, a), (_, b)
in [a .. b]
|