function get_subset(bitmask)
subset = bitmask
answer = [bitmask]
while subset != 0
subset = (subset - 1) & bitmask
put subset into the answer list
end while
return answer
end function
function get_subset(bitmask)
subset = bitmask
answer = [bitmask]
while subset != 0
subset = (subset - 1) & bitmask
put subset into the answer list
end while
return answer
end function