Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for walkCh (0.07 sec)

  1. doc/go_spec.html

    	key         K
    	value       V
    }
    
    func (t *Tree[K, V]) walk(yield func(key K, val V) bool) bool {
    	return t == nil || t.left.walk(yield) && yield(t.key, t.value) && t.right.walk(yield)
    }
    
    func (t *Tree[K, V]) Walk(yield func(key K, val V) bool) {
    	t.walk(yield)
    }
    
    // walk tree t in-order
    var t Tree[string, int]
    for k, v := range t.Walk {
    	// process k, v
    }
    </pre>
    
    
    Registered: Tue Nov 05 11:13:11 UTC 2024
    - Last Modified: Wed Oct 02 00:58:01 UTC 2024
    - 282.5K bytes
    - Viewed (0)
Back to top