3 lines
136 B
APL
3 lines
136 B
APL
tree←1(2(4(7⍬⍬)⍬)(5⍬⍬))(3(6(8⍬⍬)(9⍬⍬))⍬)
|
||
visit←{⍺,(×≢⍵)⍴⊃⍵}
|
||
children←{⊂¨@(×∘≢¨)1↓⍵}
|