I want to visualize how Flatten
works and have a slider that changes the level of flattening.
Here is the list of lists I'm using and Flatten function.
bifurcate[list_] := Nest[Partition[#, 2] &, list, Floor[Log[2, Length[list1]]]]
(structured = bifurcate[list1])//TreeForm
structured // Flatten[#, n] &
I want to be able to change the value of n
from 1 to 3 with a step of 1,
However,
TreeForm[Flatten[structured, n]], {n, 0, 3}
doesn't work. What am I doing wrong?
bifurcate
useLength[list]
rather thanLength[list1]
? $\endgroup$