-
Notifications
You must be signed in to change notification settings - Fork 0
Select
Subhajit Sahu edited this page Mar 24, 2021
·
2 revisions
Checks if ith value is true. 📰 📘
boolean.Select[n](i, a, b, ...)
// i: index
// a: 1st boolean
// b: 2nd boolean
import (
boolean "github.com/golangf/extra-boolean"
)
boolean.Select(0, true, false)
// true ^
boolean.Select(1, true, false)
// false ^
boolean.Select4(1, true, true, false, false)
// true ^
boolean.Select4(2, true, true, false, false)
// false ^