Power set: Difference between revisions
m
RPL: add section
(RPL: add section) |
m (RPL: add section) |
||
Line 3,706:
≪
'''IF''' DUP SIZE
'''THEN''' LAST OVER SWAP GET →
≪ LIST→ 1 - SWAP DROP →LIST '''POWST'''
1 OVER SIZE '''FOR''' j
DUP j GET
≫
'''ELSE''' 1 →LIST '''END'''
Line 3,716:
'''POWST''' ''( { set } -- { power set } )''
if set is not empty
then store
get power set of ''{ set } -
for all sets of ''{ set } -
add
else return { { } }
|