Commit b471d227 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent a618da28
......@@ -339,8 +339,8 @@ func IntSets(N int) chan []int {
func intSets(ch chan []int, lo, hi int) {
ch <- []int{} // ø
for i := lo; i < hi; i++ {
if i < hi-1 {
if lo < hi {
for i := lo; i < hi; i++ {
chTail := make(chan []int)
go intSets(chTail, i+1, hi)
for tail := range chTail {
......@@ -360,9 +360,8 @@ func TestIntSets(t *testing.T) {
I := func(v ...int) []int { return v }
want := [][]int{I(),
I(0),
I(0,1), I(0,2), I(0,1,2),
I(1),
I(0), I(0,1), I(0,1,2), I(0,2),
I(1), I(1,2),
I(2),
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment