func AllSequences(t *tree.Tree) []*list.List {
	var results []*list.List
	if t == nil {
		l := list.New()
		results = append(results, l)
		return results
	}

	prefix := list.New()
	prefix.PushBack(t.Value)

	resL := AllSequences(t.Left)
	resR := AllSequences(t.Right)

	for _, lL := range resL {
		for _, lR := range resR {
			results = weaveList(lL, lR, prefix, results)
		}
	}
	return results
}
// AllSequences solves ch04-p09

AllSequences solves ch04-p09
// AllSequences solves ch04 - p09
func AllSequences(t *tree.Tree) []*list.List {
	var results []*list.List
	if t == nil {
		l := list.New()
		results = append(results, l)
		return results
	}
	prefix := list.New()
	prefix.PushBack(t.Value)
	resL := AllSequences(t.Left)
	resR := AllSequences(t.Right)
	for _, lL := range resL {
		for _, lR := range resR {
			results = weaveList(lL, lR, prefix, results)
		}
	}
	return results
}
func AllSequences ( t * tree . Tree ) [ ] * list . List { var results [ ] * list . List if t == nil { l := list . New ( ) results = append ( results , l ) return results } prefix := list . New ( ) prefix . PushBack ( t . Value ) resL := AllSequences ( t . Left ) resR := AllSequences ( t . Right ) for _ , lL := range resL { for _ , lR := range resR { results = weaveList ( lL , lR , prefix , results ) } } return results }
AllSequences solves ch04-p09
AllSequences solves ch04 - p09