note
tilly
Didn't the rules say <i>arbitrary</i> list? Try this with
the list (1,2,3,1) and you get incorrect output.<P>
However here is another 57 char solution that does not
suffer from this deficiency.
<code>
sub p{
@_?map{my$x=shift;@r=map[$x,@$_],&p;push@_,$x;@r}1..@_:[]
}
</code>
77751
77830