Skip to content
Subhajit Sahu edited this page Mar 24, 2021 · 3 revisions

Checks if odd no. of values are true. 📰 📘

Similar: Xor, Xnor.
Similar: And, Or, Not, Xor.


boolean.Xor(a, b, ...)
// a: 1st boolean
// b: 2nd boolean
import (
	boolean "github.com/golangf/extra-boolean"
)

boolean.Xor(true, false)
// true

boolean.Xor(true, true)
// false

boolean.Xor4(true, true, true, false)
// true

boolean.Xor4(true, true, true, true)
// false


References

Clone this wiki locally