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

9 lines
156 B
Text
Raw Permalink Normal View History

2023-07-01 11:58:00 -04: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