code: func (p *Prefix) Subnets(n int) []Prefix {
  	if 0 > n || n > 17 { // don't bother runtime.makeslice by big numbers
  		return nil
  	}
  	ps := make([]Prefix, 1<<uint(n))
  	if p.IP.To4() != nil {
  		x := ipToIPv4Int(p.IP)
  		off := uint(IPv4PrefixLen - p.Len() - n)
  		for i := range ps {
  			ii := x | ipv4Int(i<<off)
  			ps[i] = *ii.prefix(p.Len()+n, IPv4PrefixLen)
  		}
  		return ps
  	}
  	x := ipToIPv6Int(p.IP)
  	off := IPv6PrefixLen - p.Len() - n
  	for i := range ps {
  		id := ipv6Int{0, uint64(i)}
  		id.lsh(off)
  		ii := ipv6Int{x[0] | id[0], x[1] | id[1]}
  		ps[i] = *ii.prefix(p.Len()+n, IPv6PrefixLen)
  	}
  	return ps
  }
docs: // Subnets returns a list of prefixes that are split from p, into
  // small address blocks by n which represents a number of subnetworks
  // in the power of 2 notation.