Matrix#map should always preserve structure