aboutsummaryrefslogtreecommitdiff
path: root/src/matrix.hs
blob: 21c85f08fc0b9d415d5483bb8f4025c57a681799 (plain)
1
2
3
4
5
6
7
8
9
10
module Matrix where

import Data.List


newtype Matrix a = Matrix { getMatrix :: [[a]] }

instance Show a => Show (Matrix a) where
    show (Matrix m) = intercalate "\n" (map showLine m)
        where showLine l = "[ " ++ intercalate " , " (map show l) ++ " ]"