func Combinations(list Replacer, select_num int, repeatable bool, buf int) (c chan Replacer) {
	c = make(chan Replacer, buf)
	index := make([]int, list.Len(), list.Len())
	for i := 0; i < list.Len(); i++ {
		index[i] = i
	}

	var comb_generator func([]int, int, int) chan []int
	if repeatable {
		comb_generator = repeated_combinations
	} else {
		comb_generator = combinations
	}

	go func() {
		defer close(c)
		for comb := range comb_generator(index, select_num, buf) {
			c <- list.Replace(comb)
		}
	}()

	return
}
func Combinations(list Replacer, select_num int, repeatable bool, buf int) (c chan Replacer) {
	c = make(chan Replacer, buf)
	index := make([]int, list.Len(), list.Len())
	for i := 0; i < list.Len(); i++ {
		index[i] = i
	}

	var comb_generator func([]int, int, int) chan []int
	if repeatable {
		comb_generator = repeated_combinations
	} else {
		comb_generator = combinations
	}

	go func() {
		defer close(c)
		for comb := range comb_generator(index, select_num, buf) {
			c <- list.Replace(comb)
		}
	}()

	return
}
//Combination generator