func recursive_each(n trie.Node, proc func(trie.Node)) { n.Each(func(m trie.Node) bool { proc(m) recursive_each(m, proc) return true }) }
// splitLabels split children which have children or not. func (m *matcher) splitLabels(n trie.Node) (label string, nodes *list.List) { l := list.New() b := new(bytes.Buffer) n.Each(func(t trie.Node) bool { if t.HasChildren() { l.PushBack(t) } else { b.WriteRune(t.Label()) } return true }) return b.String(), l }