code: func (g *Graph) set(path *Graph, val interface{}) *Graph {
  
  	node := g
  
  	i := 0
  	var prev *Graph
  
  	for ; i < len(path.Out); i++ {
  
  		prev = node
  
  		elem := path.Out[i]
  		if elem.ThisString() == TypeIndex {
  			i := elem.Int64()
  			if len(node.Out) <= int(i) {
  				o := make([]*Graph, i+1)
  				for j, n := range node.Out {
  					o[j] = n
  				}
  				node.Out = o
  			}
  			node.Out[i] = New(val)
  			return node.Out[i]
  		}
  		node = node.Node(elem.ThisString())
  
  		if node == nil {
  			break
  		}
  	}
  
  	if node == nil {
  		node = prev
  
  		for ; i < len(path.Out); i++ {
  			elem := path.Out[i]
  
  			if elem.ThisString() == TypeIndex {
  				i := elem.Int64()
  				if len(node.Out) <= int(i) {
  					o := make([]*Graph, i+1)
  					for j, n := range node.Out {
  						o[j] = n
  					}
  					node.Out = o
  				}
  				node.Out[i] = New(val)
  				return node.Out[i]
  			}
  
  			node = node.Add(elem.This)
  		}
  	}
  
  	node.Out = nil
  
  	return node.addNodes(val)
  }
docs: // TODO: Clean this code: