Believe it or not, I implemented powerset() as a joke in Gosu years ago:<p><pre><code> var set : java.util.Set<String> = {"a", "b", "c"}
print( set.powerSet() )
</code></pre>
prints<p><pre><code> [[], [b], [c], [b, c, a], [a], [b, c], [a, c], [b, a]]
</code></pre>
You can try it here (until the Heroku dyno goes down):<p><pre><code> http://gosu-lang.github.io/play.html</code></pre>