5 lines
113 B
Haskell
5 lines
113 B
Haskell
|
|
idMatrix :: Int -> [[Int]]
|
||
|
|
idMatrix n =
|
||
|
|
let xs = [1 .. n]
|
||
|
|
in xs >>= \x -> [xs >>= \y -> [fromEnum (x == y)]]
|