code: func (s *stack) RotN(n int32) error {
  	if n < 1 {
  		str := fmt.Sprintf("attempt to rotate %d stack items", n)
  		return scriptError(ErrInvalidStackOperation, str)
  	}
  
  	// Nip the 3n-1th item from the stack to the top n times to rotate
  	// them up to the head of the stack.
  	entry := 3*n - 1
  	for i := n; i > 0; i-- {
  		so, err := s.nipN(entry)
  		if err != nil {
  			return err
  		}
  
  		s.PushByteArray(so)
  	}
  	return nil
  }
docs: // RotN rotates the top 3N items on the stack to the left N times.
  //
  // Stack transformation:
  // RotN(1): [... x1 x2 x3] -> [... x2 x3 x1]
  // RotN(2): [... x1 x2 x3 x4 x5 x6] -> [... x3 x4 x5 x6 x1 x2]