code: func gfPolyAdd(a, b gfPoly) gfPoly {
  	numATerms := a.numTerms()
  	numBTerms := b.numTerms()
  
  	numTerms := numATerms
  	if numBTerms > numTerms {
  		numTerms = numBTerms
  	}
  
  	result := gfPoly{term: make([]gfElement, numTerms)}
  
  	for i := 0; i < numTerms; i++ {
  		switch {
  		case numATerms > i && numBTerms > i:
  			result.term[i] = gfAdd(a.term[i], b.term[i])
  		case numATerms > i:
  			result.term[i] = a.term[i]
  		default:
  			result.term[i] = b.term[i]
  		}
  	}
  
  	return result.normalised()
  }
docs: // gfPolyAdd returns a + b.