Permutations by murky-satyr

P:=method(a,r,if(a size<1,r join(" ")println,a foreach(v,P(a select(!=v),r clone push(v)))))
P(list(0,1,2,3,4,5),list)

Note that non-ascii characters in the above source code will be escaped (such as \x9f).

download

return to the top page