combinations function

Combinations generator