Permutations: Difference between revisions

m
→‎{{header|C sharp|C#}}: Removed minor ) syntax problem, and this code not works whatever, because T and T cannot be compared.
m (→‎{{header|C sharp|C#}}: Removed minor ) syntax problem, and this code not works whatever, because T and T cannot be compared.)
Line 1,610:
if (values.Count() == 1)
return new [] {values};
return values.SelectMany(v => Permutations(values.Where(x=> x != v))),(v, p) => p.Prepend(v));
}</lang>
Usage
Anonymous user