On Fri, Aug 06, 2021 at 12:42:34AM -0700, Miraddo wrote:

Hi!

> I can not understand why when we use append, it does not rewrite values in 
> the same address in the memory that it had before, 
> 
> (I'm not sure it "append" problem or the variable |  or just my problem for 
> sure :) ) 
[...]
> I saw all addresses in memory was changed, 
> 
> now my question is why it doesn't rewrite the values in the same address as 
> before?
[...]

Have you read and understood [1] and [2]?
I think the information from these articles will enable you to solve your
problem all by yourself.

I would also argue that rotating an array *in place* by a non-negative value
is "classically" solved by using a temporary variable and moving of the
array elements; the latter can be done by using copy().

 1. https://blog.golang.org/slices-intro
 2. https://blog.golang.org/slices

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/20210806165959.lwyefdc5daxlmp7y%40carbon.

Reply via email to