// If calls the function f with the value if the value is present.
322546
func (u Uint16) If(fn func(uint16)) {
	if u.Present() {
		fn(*u.value)
	}
}
287142
func (u Uint32) If(fn func(uint32)) {
	if u.Present() {
		fn(*u.value)
	}
}
336052
func (f F) Equal(g F) bool {
	if len(f.Zones) != len(g.Zones) {
		return false
	}
	for i := range f.Zones {
		if f.Zones[i] != g.Zones[i] {
			return false
		}
	}
	return true
}
416956
func (f Float32) Value() (driver.Value, error) {
	if !f.Valid {
		return nil, nil
	}
	return f.Float32, nil
}
1307000
func Function(fn string) {
	if e, ok := encodingDefinition(); ok {
		e.Function = fn
	}
}
1152934
func F(key string, value interface{}) Field {
	return Field{Key: key, Value: value}
}
856775
func (f *Fake) IsFunction() bool {
	if f.Target == nil || f.Target.Type() == nil || f.Target.Type().Underlying() == nil {
		return false
	}
	_, ok := f.Target.Type().Underlying().(*types.Signature)
	return ok
}
1187025
func (rcv groups) Any(fn func(group) bool) bool {
	for _, v := range rcv {
		if fn(v) {
			return true
		}
	}
	return false
}
176861
func (functions Functions) Evaluate(values map[string][]string) bool {
	for _, f := range functions {
		if !f.evaluate(values) {
			return false
		}
	}

	return true
}
739263
func (value Value) IsFunction() bool {
	if value.kind != valueObject {
		return false
	}
	return value.value.(*_object).class == "Function"
}
715309
func (p *printer) f(format string, args ...interface{}) {
	if p.Err != nil {
		return
	}
	if _, err := fmt.Fprintf(&p.indent, format, args...); err != nil && err != io.ErrShortWrite {
		p.Err = err
	}
}
380554
func (p *Probe) Do(f Func) {
	p.Lock()
	if p.inprogress != idle {
		p.Unlock()
		return
	}
	p.inprogress = active
	interval := p.interval
	p.Unlock()
	// Passed the lock. Now run f for as long it returns false. If a true is returned
	// we return from the goroutine and we can accept another Func to run.
	go func() {
		i := 1
		for {
			if err := f(); err == nil {
				break
			}
			time.Sleep(interval)
			if i%2 == 0 && i < 4 { // 4 is 2 doubles, so no need to increase anymore - this is *also* checked in double()
				p.double()
			}
			p.Lock()
			if p.inprogress == stop {
				p.Unlock()
				return
			}
			p.Unlock()
			i++
		}

		p.Lock()
		p.inprogress = idle
		p.Unlock()
	}()
}
1371483
func (f *functionQuery) Evaluate(t iterator) interface{} {
	return f.Func(f.Input, t)
}
970797
func (f *File) Check() {
	// TODO
	typs := make(map[ast.Expr]types.TypeAndValue)
	defs := make(map[*ast.Ident]types.Object)
	uses := make(map[*ast.Ident]types.Object)
	config := types.Config{FakeImportC: true}
	config.Importer = importer.Default()
	info := &types.Info{Types: typs, Defs: defs, Uses: uses}
	astFiles := []*ast.File{f.ast}
	typesPkg, err := config.Check(fileDir(f), f.fs, astFiles, info)
	if err != nil {
		log.Fatalf("checking package: %s", err)
	}
	f.Info = info
	f.Pkg = typesPkg
}
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,
	}
}
779298
func (F *Frisby) Expect(foo ExpectFunc) *Frisby {
	Global.NumAsserts++
	if ok, err_str := foo(F); !ok {
		F.AddError(err_str)
	}
	return F
}
50795
func (p *Partial) Function() (f Function, err error) {
	err = p.Unmarshal(&f)
	return
}