Q8 ?: A- }; ^, p( {/ IA matrix can be rotated by performing a number of successive operations. Rotate the) X" ^ Q6 t+ C
matrix {{1,2,3},{4,5,6}} clockwise by 90 degrees, obtaining % E% f5 w& s% V$ H! k{{4,1},{5,2},{6,3}}, in two steps. Use TableForm to display the results. # {+ P$ Z/ ?9 F0 W 4 I2 E9 p9 ?4 H: ~) g' m7 z) n! @$ B3 U使用apply,而不是map.; G! N h' J X6 D
作法如下:0 x/ I) o' }. J% \; B8 C8 v
- H. L4 }- t3 n! D7 p