Permutations with some identical elements: Difference between revisions
Content deleted Content added
m →{{header|Phix}}: syntax coloured, use of new builtin |
→{{header|Wren}}: Now uses Wren-perm module. |
||
Line 1,370:
=={{header|Wren}}==
{{
<lang ecmascript>
var createList = Fn.new { |nums, charSet|
Line 1,410 ⟶ 1,381:
}
var nums = [2, 1]
var
System.print(Perm.listDistinct(a).map { |p| p.join() }.toList)
System.print()
nums = [2, 3, 1]
System.print(Perm.listDistinct(a).map { |p| p.join() }.toList)
System.print()
System.print(Perm.listDistinct(a).map { |p| p.join() }.toList)</lang>
▲s = createList.call(nums, "ABC")
{{out}}
|