Use newtype for Matrix
This commit is contained in:
parent
13f8d05030
commit
18fe09a531
@ -1,8 +1,8 @@
|
|||||||
module Matrix where
|
module Matrix where
|
||||||
import Data.List (intercalate)
|
import Data.List (intercalate)
|
||||||
|
|
||||||
data Mat a = Mat [[a]]
|
newtype Mat a = Mat [[a]]
|
||||||
type Pos = (Int, Int)
|
type Pos = (Int, Int)
|
||||||
|
|
||||||
instance Functor Mat where
|
instance Functor Mat where
|
||||||
fmap f (Mat m) = Mat ((map . map) f m)
|
fmap f (Mat m) = Mat ((map . map) f m)
|
||||||
|
Loading…
Reference in New Issue
Block a user