type block … const blockBits … type Filter … // NewFilter constructs a new Filter with the given elements. func NewFilter(elems []string) *Filter { … } // locate returns the block index and bit corresponding to the given hash seed and // string. func (f *Filter) locate(seed maphash.Seed, s string) (index int, bit block) { … } func assert(cond bool, msg string) { … } // calibrate approximates the number of blocks and seeds to use for a bloom // filter with desired false positive rate fpRate, given n elements. func calibrate(fpRate float64, n int) (blocks, seeds int) { … } // MayContain reports whether the filter may contain s. func (f *Filter) MayContain(s string) bool { … }