RosettaCodeData/Task/Power-set/Standard-ML/power-set.ml
2023-07-01 13:44:08 -04:00

1 line
82 B
Standard ML

fun subsets xs = foldr (fn (x, rest) => rest @ map (fn ys => x::ys) rest) [[]] xs