github.com/gnolang/gno@v0.0.0-20240520182011-228e9d0192ce/gnovm/tests/files/zavltree0.gno (about)

     1  package main
     2  
     3  import (
     4  	"github.com/gnolang/gno/_test/timtadh/data_structures/tree/avl"
     5  	"github.com/gnolang/gno/_test/timtadh/data_structures/types"
     6  )
     7  
     8  func main() {
     9  	var tree *avl.AvlNode
    10  	var updated bool
    11  	tree, updated = tree.Put(types.String("key0"), "value0")
    12  	println(updated, tree.Size())
    13  	tree, updated = tree.Put(types.String("key0"), "value0-new")
    14  	println(updated, tree.Size())
    15  }
    16  
    17  // Output:
    18  // false 1
    19  // true 1