SubSetGenerator
From Erlang Community
[edit] Authors
[edit] Subset Generator
Here's a simple generator that gives you a subset of the elements in a set, i.e., given a list of elements, it selects some of these elements. It shrinks to the smallest subset, the empty list.
subset(Generators) ->
?LET(Keep,[ {bool(),G} || G<-Generators],
[ G || {true,G}<-Keep]).
|

Digg It
Del.icio.us
Reddit
Facebook
Stumble Upon
Technorati

