// If calls the function f with the value if the value is present.
554020
func (i Int) If(fn func(int)) {
	if i.Present() {
		fn(*i.value)
	}
}
1275921
func (b Byte) If(fn func(byte)) {
	if b.Present() {
		fn(*b.value)
	}
}
261670
func (e Equalities) AddFunc(eqFunc interface{}) error {
	fv := reflect.ValueOf(eqFunc)
	ft := fv.Type()
	if ft.Kind() != reflect.Func {
		return fmt.Errorf("expected func, got: %v", ft)
	}
	if ft.NumIn() != 2 {
		return fmt.Errorf("expected two 'in' params, got: %v", ft)
	}
	if ft.NumOut() != 1 {
		return fmt.Errorf("expected one 'out' param, got: %v", ft)
	}
	if ft.In(0) != ft.In(1) {
		return fmt.Errorf("expected arg 1 and 2 to have same type, but got %v", ft)
	}
	var forReturnType bool
	boolType := reflect.TypeOf(forReturnType)
	if ft.Out(0) != boolType {
		return fmt.Errorf("expected bool return, got: %v", ft)
	}
	e[ft.In(0)] = fv
	return nil
}
850450
func Conditional(claimPredicate func() bool, validPredicate func() bool) Rule {
	if claimPredicate == nil {
		claimPredicate = emptyConditionalPredicate
	}

	if validPredicate == nil {
		validPredicate = emptyConditionalPredicate
	}

	return &conditionalRule{
		claimPredicate: claimPredicate,
		validPredicate: validPredicate,
	}
}
719252
func (f stringNotEqualsIgnoreCaseFunc) evaluate(values map[string][]string) bool {
	return !f.stringEqualsIgnoreCaseFunc.evaluate(values)
}
877862
func ifHelper(conditional interface{}, options *Options) interface{} {
	if options.isIncludableZero() || IsTrue(conditional) {
		return options.Fn()
	}

	return options.Inverse()
}
283122
func If(cond func(ctx context.Context, w http.ResponseWriter, r *http.Request) bool, condNext func(next HandlerC) HandlerC) func(next HandlerC) HandlerC {
	return func(next HandlerC) HandlerC {
		return HandlerFuncC(func(ctx context.Context, w http.ResponseWriter, r *http.Request) {
			if cond(ctx, w, r) {
				condNext(next).ServeHTTPC(ctx, w, r)
			} else {
				next.ServeHTTPC(ctx, w, r)
			}
		})
	}
}
492049
func If(condition string, valueIfTrue, valueIfFalse Stringable) IfFunc {
	return IfFunc{
		list:         false,
		Condition:    condition,
		ValueIfTrue:  *valueIfTrue.String(),
		ValueIfFalse: *valueIfFalse.String(),
	}
}
272371
func (w *ComparedValue) init() {
	w.waiters = make(map[interface{}]*Value)
	if w.Func == nil {
		w.Func = func(k, v interface{}) bool { return k == v }
	}
}
1258959
func (o *Once) Do(fn ...func()) bool {
	if !atomic.CompareAndSwapUint32((*uint32)(o), 0, 1) {
		return false
	}
	for _, f := range fn {
		if f != nil {
			f()
		}
	}
	return true
}
1256397
func If(condition bool, condTrue Cond, condFalse ...Cond) Cond {
	var c = condIf{
		condition: condition,
		condTrue:  condTrue,
	}
	if len(condFalse) > 0 {
		c.condFalse = condFalse[0]
	}
	return c
}
89411
func (t *Tree) hasFunction(name string) bool {
	for _, funcMap := range t.funcs {
		if funcMap == nil {
			continue
		}
		if funcMap[name] != nil {
			return true
		}
	}
	return false
}
1259234
func findFunction(name string) (reflect.Value, bool) {
	if fn := builtinFuncs[name]; fn.IsValid() {
		return fn, true
	}
	return reflect.Value{}, false
}
538551
func (f Float64) If(fn func(float64)) {
	if f.Present() {
		fn(*f.value)
	}
}
576312
func (c Complex64) If(fn func(complex64)) {
	if c.Present() {
		fn(*c.value)
	}
}
1371483
func (f *functionQuery) Evaluate(t iterator) interface{} {
	return f.Func(f.Input, t)
}
1307000
func Function(fn string) {
	if e, ok := encodingDefinition(); ok {
		e.Function = fn
	}
}