Visualize nested array You will be given a nested array. Your program has to visualize the array.

But.. How?
For example, let's assume we have a nested array, like [[&quot;1&quot;,&quot;2&quot;],[[&quot;1&quot;,&quot;2&quot;],&quot;3&quot;],&quot;4&quot;,[[[[&quot;5&quot;]]]],&quot;6&quot;].
This nested array can be visualised as:
-&gt;1
-&gt;2
--&gt;1
--&gt;2
-&gt;3
&gt;4
----&gt;5
&gt;6


Examples
Input 1:
[&quot;Atom&quot;,[&quot;Proton&quot;,[&quot;Up Quark&quot;, &quot;Up Quark&quot;, &quot;Down Quark&quot;], &quot;Neutron&quot;, [&quot;Up Quark&quot;, &quot;Down Quark&quot;, &quot;Down Quark&quot;], &quot;Electron&quot;]]
Output 1:
&gt;Atom
-&gt;Proton
--&gt;Up Quark
--&gt;Up Quark
--&gt;Down Quark
-&gt;Neutron
--&gt;Up Quark
--&gt;Down Quark
--&gt;Down Quark
-&gt;Electron

Input 2:
[[&quot;1&quot;,&quot;2&quot;],[&quot;3&quot;,&quot;4&quot;]]
Output 2:
-&gt;1
-&gt;2
-&gt;3
-&gt;4


Rules

You may use string (or other types which work like a nested array) as input.
The maximum level of &quot;layers&quot; is 2^32-1.
APL, 32 bytes

{1=≡⍺:⎕←⍺,⍨⍵↑1↓⍵/'-&gt;'⋄⍺∇¨⍵+1}∘0


Test:

      r
┌────┬─────────────────────────────────────────────────────────────────────────────────────────┐
│Atom│┌──────┬──────────────────────────────┬───────┬────────────────────────────────┬────────┐│
│    ││Proton│┌────────┬────────┬──────────┐│Neutron│┌────────┬──────────┬──────────┐│Electron││
│    ││      ││Up Quark│Up Quark│Down Quark││       ││Up Quark│Down Quark│Down Quark││        ││
│    ││      │└────────┴────────┴──────────┘│       │└────────┴──────────┴──────────┘│        ││
│    │└──────┴──────────────────────────────┴───────┴────────────────────────────────┴────────┘│
└────┴─────────────────────────────────────────────────────────────────────────────────────────┘
      {1=≡⍺:⎕←⍺,⍨⍵↑1↓⍵/'-&gt;'⋄⍺∇¨⍵+1}∘0 ⊢ r 
&gt;Atom
-&gt;Proton
--&gt;Up Quark
--&gt;Up Quark
--&gt;Down Quark
-&gt;Neutron
--&gt;Up Quark
--&gt;Down Quark
--&gt;Down Quark
-&gt;Electron


Explanation:


{...}∘0: run the following function with 0 bound to ⍵:


1=≡⍺:: if the input has depth 1 (i.e. an array that does not contain other arrays):


⍵/'-&gt;': create a string containing ⍵ -s and ⍵ &gt;s, 
1↓: drop the first element,
⍵↑: and take the first ⍵ elements. This results in a string containing ⍵-1 dashes and one &gt;.
⍺,⍨: append the input to it,
⎕←: and output that to the screen

⋄: otherwise,


⍺∇¨⍵+1: add 1 to ⍵ and apply the function to each nested array