Array#powerset
For some reason I was looking up my company and found this Ruby function for finding the power set of an array. I compacted it a bit more:
class Array
def powerset
inject([[]]){|c,y|c.inject([]){|r,i|r+=[i,i+[y]]}}
end
end

