Question: How to get map on Matrix to work

map seems to work differently on lists and Matricies.  How do I get map to work on the Matrix?

a := [[1.2, 4.3], [3.2, 5.3]]

[[1.2, 4.3], [3.2, 5.3]]

(1)

whattype(a)

list

(2)

a[1]

[1.2, 4.3]

(3)

b := map(proc (x) options operator, arrow; [floor(x[1]), x[2]] end proc, a)

[[1, 4.3], [3, 5.3]]

(4)

c := convert(a, Matrix)

Matrix(%id = 36893488148073393796)

(5)

whattype(c)

Matrix

(6)

c[1]

Vector[row](%id = 36893488148073381388)

(7)

d := map(proc (x) options operator, arrow; [floor(x[1]), x[2]] end proc, c)

Matrix(%id = 36893488148073382844)

(8)

``

Download ListMatrixmap.mw

Please Wait...