stack/stack.go
func (s *Stack) merge(r *Stack) *Stack {
	// Assumes similar stacks have the same length.
	out := &Stack{
		Calls:  make([]Call, len(s.Calls)),
		Elided: s.Elided,
	}
	for i := range s.Calls {
		out.Calls[i] = s.Calls[i].merge(&r.Calls[i])
	}
	return out
}
func (s *Stack) merge(r *Stack) *Stack {
	// Assumes similar stacks have the same length.
	out := &Stack{
		Calls:  make([]Call, len(s.Calls)),
		Elided: s.Elided,
	}
	for i := range s.Calls {
		out.Calls[i] = s.Calls[i].merge(&r.Calls[i])
	}
	return out
}
func ( s * Stack ) merge ( r * Stack ) * Stack { // Assumes similar stacks have the same length. out := & Stack { Calls : make ( [ ] Call , len ( s . Calls ) ) , Elided : s . Elided , } for i := range s . Calls { out . Calls [ i ] = s . Calls [ i ] . merge ( & r . Calls [ i ] ) } return out }
// merge merges two similar Stack, zapping out differences.
merge merges two similar Stack zapping out differences .