title: How to get all subsets of a set? (powerset)
body: <p>Given a set </p>
  
  <pre><code>{0, 1, 2, 3}
  </code></pre>
  
  <p>How can I produce the subsets:</p>
  
  <pre><code>[set(),
   {0},
   {1},
   {2},
   {3},
   {0, 1},
   {0, 2},
   {0, 3},
   {1, 2},
   {1, 3},
   {2, 3},
   {0, 1, 2},
   {0, 1, 3},
   {0, 2, 3},
   {1, 2, 3},
   {0, 1, 2, 3}]
  </code></pre>