escape &&

This commit is contained in:
zigo101
2025-11-13 23:29:34 +00:00
committed by GitHub
parent 17a02b9106
commit a368bc0208

View File

@@ -4857,7 +4857,7 @@ For instance, <code>x / y * z</code> is the same as <code>(x / y) * z</code>.
x &lt;= f() // x &lt;= f()
^a &gt;&gt; b // (^a) >> b
f() || g() // f() || g()
x == y+1 &amp;&amp; &lt;-chanInt &gt; 0 // (x == (y+1)) && ((&lt;-chanInt) > 0)
x == y+1 &amp;&amp; &lt;-chanInt &gt; 0 // (x == (y+1)) &amp;&amp; ((&lt;-chanInt) > 0)
</pre>
@@ -6867,7 +6867,7 @@ type Tree[K cmp.Ordered, V any] struct {
}
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)
return t == nil || t.left.walk(yield) &amp;&amp; yield(t.key, t.value) &amp;&amp; t.right.walk(yield)
}
func (t *Tree[K, V]) Walk(yield func(key K, val V) bool) {