Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- f[Range[8]]
- Flatten[Table[f[%[[p]]], {p, Length[%]}], 1]
- Flatten[Table[f[%[[p]]], {p, Length[%]}], 1]
- {{1, 2, {3, 4}, 5, 6, 7, 8},
- {1, 2, 3, {4, 5}, 6, 7, 8},
- {1, 2, 3, 4, {5, 6}, 7, 8}}
- {{1, 2, {{3, 4}, 5}, 6, 7, 8},
- {1, 2, {3, 4}, {5, 6}, 7, 8},
- {1, 2, {3, {4, 5}}, 6, 7, 8},
- {1, 2, 3, {{4, 5}, 6}, 7, 8},
- {1, 2, {3, 4}, {5, 6}, 7, 8},
- {1, 2, 3, {4, {5, 6}}, 7, 8}}
- {{1, 2, {{{3, 4}, 5}, 6}, 7, 8},
- {1, 2, {{3, 4}, {5, 6}}, 7, 8},
- {1, 2, {{3, {4, 5}}, 6}, 7, 8},
- {1, 2, {3, {{4, 5}, 6}}, 7, 8},
- {1, 2, {{3, 4}, {5, 6}}, 7, 8},
- {1, 2, {3, {4, {5, 6}}}, 7, 8}}
- NestWhileList[
- Flatten[Table[f[# &[[p]]], {p, Length[# &]}], 1],
- f[Range[8]], Length[#] & < 3!]
- {{{1, 2, {3, 4}, 5, 6, 7, 8},
- {1, 2, 3, {4, 5}, 6, 7, 8},
- {1, 2, 3, 4, {5, 6}, 7, 8}}}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement