func (trie *RuneTrie) WalkPath(key string, walker WalkFunc) error {
	if trie.value != nil {
		if err := walker("", trie.value); err != nil {
			return err
		}
	}
	for i, r := range key {
		if trie = trie.children[r]; trie == nil {
			return nil
		}
		if trie.value != nil {
			if err := walker(string(key[0:i+1]), trie.value); err != nil {
				return err
			}
		}
	}
	return nil
}
WalkPath iterates over each key/value in the path in trie from the root to
the node at the given key, calling the given walker function for each
key/value. If the walker function returns an error, the walk is aborted.
package trie
type RuneTrie struct {
	value    interface{}
	children map[rune]*RuneTrie
}
func NewRuneTrie() *RuneTrie {
	return new(RuneTrie)
}
func (trie *RuneTrie) Get(key string) interface{} {
	node := trie
	for _, r := range key {
		node = node.children[r]
		if node == nil {
			return nil
		}
	}
	return node.value
}
func (trie *RuneTrie) Put(key string, value interface{}) bool {
	node := trie
	for _, r := range key {
		child, _ := node.children[r]
		if child == nil {
			if node.children == nil {
				node.children = map[rune]*RuneTrie{}
			}
			child = new(RuneTrie)
			node.children[r] = child
		}
		node = child
	}
	isNewVal := node.value == nil
	node.value = value
	return isNewVal
}
func (trie *RuneTrie) Delete(key string) bool {
	path := make([]nodeRune, len(key))  
	node := trie
	for i, r := range key {
		path[i] = nodeRune{r: r, node: node}
		node = node.children[r]
		if node == nil {
			return false
		}
	}
	node.value = nil
	if node.isLeaf() {
		for i := len(key) - 1; i >= 0; i-- {
			parent := path[i].node
			r := path[i].r
			delete(parent.children, r)
			if !parent.isLeaf() {
				break
			}
			parent.children = nil
			if parent.value != nil {
				break
			}
		}
	}
	return true  
}
func (trie *RuneTrie) Walk(walker WalkFunc) error {
	return trie.walk("", walker)
}