blob: c2e6654b63e9d5da8266a96e7d740dab17407d13 (
plain)
1
2
3
4
5
6
7
8
9
10
|
module Matrix where
import Data.List
newtype Matrix a = Matrix { getMatrix :: [MatrixRow a] }
type MatrixRow a = [a]
instance Show a => Show (Matrix a) where
show (Matrix m) = intercalate "\n" (map showLine m)
where showLine l = "[ " ++ intercalate " , " (map show l) ++ " ]"
|