// Add adds one input to another.
187472
func (as ArraySpec) Add(val Input) Input {
	return as.proc(func(i Input) Input {
		return i.Add(val)
	})
}
409347
func (p Pairs) Add(other []Pair) []Pair {
	// Create lookup of key/counts.
	m := make(map[uint64]uint64, len(p))
	for _, pair := range p {
		m[pair.ID] = pair.Count
	}

	// Add/merge from other.
	for _, pair := range other {
		m[pair.ID] += pair.Count
	}

	// Convert back to slice.
	a := make([]Pair, 0, len(m))
	for k, v := range m {
		a = append(a, Pair{ID: k, Count: v})
	}
	return a
}
123365
func (i *Input) Add(src io.Reader) error {
	i.Mutex.Lock()
	defer i.Mutex.Unlock()
	if i.src != nil {
		return fmt.Errorf("Maximum number of sources reached: 1")
	}
	i.src = src
	return nil
}
1284894
func (l *List) Add(values ...interface{}) {
	l.values = append(l.values, values...)
}
422208
func (m *Encoders) Add(match string, e respond.Encoder) {
	m.lock.Lock()
	m.encoders[match] = e
	m.lock.Unlock()
}
1148771
func (err *MultiError) Add(errOrNil error) {
	if err != nil && errOrNil != nil {
		*err = append(*err, errOrNil)
	}
}
336682
func (f *FIFO) Add(obj interface{}) error {
	id, err := f.keyFunc(obj)
	if err != nil {
		return KeyError{obj, err}
	}
	f.lock.Lock()
	defer f.lock.Unlock()
	f.populated = true
	if _, exists := f.items[id]; !exists {
		f.queue = append(f.queue, id)
	}
	f.items[id] = obj
	f.cond.Broadcast()
	return nil
}
630480
func (p *Imports) Add(prev string, path string, bs []byte) error {
	p.Lock()
	defer p.Unlock()

	// TODO: align these with libsass name "stdin"
	if len(prev) == 0 || prev == "string" {
		prev = "stdin"
	}
	im := Import{
		bytes: bs,
		mod:   time.Now(),
		Prev:  prev,
		Path:  path,
	}

	p.m[prev+":"+path] = im
	return nil
}
774608
func (p *Parameters) Add(i interface{}) int {
	p.args = append(p.args, i)
	return len(p.args)
}
353941
func (f *Filter) Add(filter, value string) {
	f.v.Add(filter, value)
}
1030068
func (c *Context) Add(key string, value interface{}) {
	c.data[key] = value
}
1110082
func (ngram *NGramIndex) Add(input string) (TokenID, error) {
	if ngram.index == nil {
		ngram.init()
	}
	results, error := ngram.splitInput(input)
	if error != nil {
		return -1, error
	}
	ixstr, error := ngram.spool.Append(input)
	if error != nil {
		return -1, error
	}
	for _, hash := range results {
		ngram.Lock()
		if ngram.index[hash] == nil {
			ngram.index[hash] = make(map[TokenID]int)
		}
		// insert string and counter
		ngram.index[hash][ixstr]++
		ngram.Unlock()
	}
	return ixstr, nil
}
1068161
func (c *stringChanger) Add(v string) error {
	if c.err != nil {
		return c.err
	}
	_, err := c.node.addChild(justValue{v})
	return err
}
1369110
func (c *CollisionSystem) Add(basic *ecs.BasicEntity, collision *CollisionComponent, space *SpaceComponent) {
	c.entities = append(c.entities, collisionEntity{basic, collision, space})
}
889825
func (b *multiErrBuilder) Add(err error) {
	if err != nil {
		b.errs = append(b.errs, err)
	}
}
265491
func (q1 Quat) Add(q2 Quat) Quat {
	return Quat{q1.W + q2.W, q1.V.Add(q2.V)}
}
1184393
func (s *set) Add(vs ...interface{}) {
	for _, v := range vs {
		s.values[v] = struct{}{}
	}
}