Parent

Methods

Set

Public Instance Methods

power_set() click to toggle source
    # File lib/more/facets/set.rb, line 4
 4:   def power_set
 5:     if empty?
 6:       Set[ self ]
 7:     else
 8:       any_value = [to_a.first]
 9:       subsubs = (self - any_value).power_set
10:       subsubs + subsubs.map{ |subset| subset + any_value }
11:     end
12:   end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.