Steven Schveighoffer:

Is there any advantage over having a function? I'd think you could easily build a range based on the function, no?

Generators (that yield lexicographic permutations, permutation swaps, combinations, etc) are quite more handy, you can compose them with the other ranges and higher order functions.

Adding to Phobos few ranges that build on a next_permutation(), next_combination(), etc, is possible, but I don't see a big need for such C++-style functions, the ranges are enough.

Bye,
bearophile

Reply via email to