-
Notifications
You must be signed in to change notification settings - Fork 0
Xor
Subhajit Sahu edited this page Mar 24, 2021
·
3 revisions
Checks if odd no. of values are true. 📰 📘
boolean.Xor(a, b, ...)
// a: 1st boolean
// b: 2nd booleanimport (
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