scramble 2 lists, keep individual order

JACK 11 06 Jan 2012 17:05

imagine i got 2 lists, for example:

```
{A,B,C,D,E→L₁
{X,Y,Z→L₂
```

i need to put these together randomly, but the order of the elements of each list must remain the same: for example

```
{A,B,C,X,D,Y,E,Z
{X,A,B,Y,Z,C,D,E
{A,X,B,C,Y,D,Z,E
```

are valid results, so A will always be in front of B, and B in front of C, and X in front of Y, and so on.

any of the possible "correct" ways of mixing the lists should have equal chance of happening

anyone got any ideas on how to do this in a clean optimized way?