Anonymous user
Power set: Difference between revisions
Added output.
(Updated to Nim 1.4: changed initSet to initHashSet, to Set to toHashSet. Also changed some variable names and some other things.) |
(Added output.) |
||
Line 2,417:
echo powerset([1,2,3,4].toHashSet())</lang>
{{out}}
<pre>{{4, 3, 1}, {3, 2, 1}, {3}, {3, 1}, {2}, {4, 3, 2, 1}, {}, {4, 2}, {4, 2, 1}, {4, 3, 2}, {1}, {3, 2}, {4, 3}, {4}, {4, 1}, {2, 1}}
</pre>
=={{header|Objective-C}}==
|