I was just thinking how Tuples was created so , I came up with this,
Flatten[Outer[List, {a, b}, {a, b}, {a, b}], 2] == Tuples[{a, b}, 3]
True
Now, I want to convert it to a function,
fun[x_List] := Block[{}, Flatten[Outer[List, x], Length[x] - 1]]
But the problem is the I need to put this List as a sequence but I am not finding a work around.
{a, b, c} /. List -> Sequencedoes something like this work? – bobthechemist Mar 17 '14 at 17:29