code: func eachFlagBit(flags uint32, fn func(flag uint32)) {
  	// Test each bit from the right, as long as there are bits left in the
  	// flag set. Clear any bits found and stop testing as soon as there are
  	// no more bits set.
  
  	currentBit := uint32(1 << 0)
  	for flags != 0 {
  		if flags&currentBit != 0 {
  			fn(currentBit)
  			flags &^= currentBit
  		}
  		currentBit <<= 1
  	}
  }
docs: // eachFlagBit calls the function once for every bit that is set in flags