RosettaCodeData/Task/Power-set/Oz/power-set-2.oz

9 lines
156 B
Text
Raw Permalink Normal View History

2013-04-10 23:57:08 -07:00
fun {Powerset2 Set}
case Set of nil then [nil]
[] H|T thens
Acc = {Powerset2 T}
in
{Append Acc {Map Acc fun {$ A} H|A end}}
end
end