go-ml.dev/pkg/base@v0.0.0-20200610162856-60c38abac71b/fu/lexic.go (about) 1 package fu 2 3 type Lexic []func(string) bool 4 5 func (lx Lexic) Accepted(s string, dflt ...bool) bool { 6 if len(lx) == 0 { 7 return Fnzb(dflt...) 8 } 9 for _, x := range lx { 10 if x(s) { 11 return true 12 } 13 } 14 return false 15 }