code: func (a *Automaton) copy(other *Automaton) {
  	// bulk copy and then fixup the state pointers
  	stateOffset := a.numStates()
  	a.states = append(a.states, other.states...)
  	for i := 0; i < len(other.states); i += 2 {
  		if a.states[stateOffset*2+i] != -1 {
  			a.states[stateOffset*2+i] += len(a.transitions)
  		}
  	}
  	otherAcceptState := other.isAccept
  	for state := otherAcceptState.NextSetBit(0); state != -1; state = otherAcceptState.NextSetBit(state + 1) {
  		a.setAccept(stateOffset+int(state), true)
  	}
  
  	// bulk copy and then fixup dest for each transition
  	transOffset := len(a.transitions)
  	a.transitions = append(a.transitions, other.transitions...)
  	for i := 0; i < len(other.transitions); i += 3 {
  		a.transitions[transOffset+i] += stateOffset
  	}
  
  	if !other.deterministic {
  		a.deterministic = false
  	}
  }
docs: /*
  Copies over all state/transition from other. The state numbers are
  sequentially assigned (appended).
  */