| 1 |
package sample |
| 2 |
|
| 3 |
// Both/Either exercise the && and || rewrite: the right operand is wrapped |
| 4 |
// in an instrumented closure compared against the intrinsic true. |
| 5 |
func Both(a, b bool) bool { |
| 6 |
return a && b |
| 7 |
} |
| 8 |
|
| 9 |
func Either(a, b bool) bool { |
| 10 |
return a || b |
| 11 |
} |