code: func (bh *Header) AddProgram(p *Program) error {
  	if _, ok := bh.seenProgs[p.uid]; ok {
  		return errDupProgram
  	}
  	if p.owner != nil || p.id >= 0 {
  		return errUsedProgram
  	}
  	p.owner = bh
  	p.id = int32(len(bh.progs))
  	bh.seenProgs[p.uid] = p.id
  	bh.progs = append(bh.progs, p)
  	return nil
  }
docs: // AddProgram adds p to the Header.