diff --git a/enum.ml b/enum.ml index 544de648..d1274a16 100644 --- a/enum.ml +++ b/enum.ml @@ -424,6 +424,9 @@ let combinations n enum = assert (n >= 0); failwith "not implemented" (* TODO *) +let powerSet enum = + failwith "not implemented" + (** {2 Basic conversion functions} *) let to_list enum = diff --git a/enum.mli b/enum.mli index 85089402..3e44dce5 100644 --- a/enum.mli +++ b/enum.mli @@ -155,10 +155,14 @@ val product : 'a t -> 'b t -> ('a * 'b) t (** Cartesian product *) val permutations : 'a t -> 'a t t - (** Permutations of the enum *) + (** Permutations of the enum. Each permutation becomes unavailable once + the next one is produced. *) val combinations : int -> 'a t -> 'a t t - (** Combinations of given length *) + (** Combinations of given length. *) + +val powerSet : 'a t -> 'a t t + (** All subsets of the enum (in no particular order) *) (** {2 Basic conversion functions} *)