PolyMath
PolyMath copied to clipboard
PMMatrix >> #asString should be distinct from PMVector >> #asString
Currently, PMMatrix just prints its contained vectors separated by newlines. This can be misleading:
a := PMMatrix rows: #((1 2)).
b := #(1 2) asPMVector.
a asString = b asString. "true"
However, a 1x2 matrix and a 2-vector are not currently polymorphic. Probably, each should have its own print signature. Maybe a "[<1 2>]" or "<<1 2>>" or "[1 2; ...]" b "<1 2>"
Can we just create asString for PMMatrix and print something like this:
a := PMMatrix rows: #((1 2)).
a asString.
>>> a PMMatrix(
a PMVector(1 2)
)