RosettaCodeData/Task/Power-set/Standard-ML/power-set.ml
Ingy döt Net b83f433714 tasks a-s
2013-04-10 23:57:08 -07:00

1 line
82 B
Standard ML

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