Esempio n. 1
0
//Based on Scala for comprehension
func Permute(ls ...lists.List) Yield {
	if len(ls) <= 0 {
		return Yield{ permuteResults: lists.CreateOptionalEmpty().List }
	}

	return Yield{permuteResults: permute(ls[0], ls[1:]) }
}
Esempio n. 2
0
func TestOptionalEmpty(t *testing.T) {
	result := lists.CreateOptionalEmpty()
	count := result.Count()
	assert.Equal(t, 0, count)
}