2020-10: Stacking It Up
Write a function that takes as its right argument a vector of simple arrays of rank 2 or less (scalar, vector, or matrix). Each simple array will consist of either non-negative integers or printable ASCII characters. The function must return a simple character array that displays identically to what {⎕←⍵}¨
displays when applied to the right argument.
💡 Hint: The Mix ↑Y
, Split ↓Y
, and Format ⍕Y
functions could be helpful for solving this problem.
Examples:
All results will look identical with ]Boxing on
as they are simple (non-nested) character arrays.
(your_function) 'Hi' 'Earth'
Hi
Earth
(your_function) (3 3⍴⍳9)(↑'Adam' 'Michael')(⍳10) '*'(5 5⍴⍳25)
1 2 3
4 5 6
7 8 9
Adam
Michael
1 2 3 4 5 6 7 8 9 10
*
1 2 3 4 5
6 7 8 9 10
11 12 13 14 15
16 17 18 19 20
21 22 23 24 25
(your_function) 'O' 'my!'
O
my!
(your_function) ,⊂⍳4
1 2 3 4
(your_function) ,'A'
A
your_function ←
Solutions

