1:50 PM
Is there some way of writing
a <- 1 ; b <- a <- 2
which ends with a=2 and b=1?
(Apart from the obvious a <- 1; b <- a; a<- 2: I'd like to avoid the extra a.)

1 hour later…
3:09 PM
@RobinRyder if you're not set on names, you could just use `T` in place of `b` and set `a=2` separately but I'm not sure how you're trying to use it

@Giuseppe a and b will be components of a vector, so it will be more like
(some value has been defined for m[1] earlier in a loop)
m[2] <- m[1]; m[1] <- 0
and I'd like not having to type m[1] twice

3:26 PM
@RobinRyder you can't just do `m=c(0,m)`? you could link to a TIO of whatever problem you're working on
or else `m=c(0,m[-1])`
er, I think that should be `m=c(0,m[-2])` but you get the idea

1 hour later…
4:37 PM
Thanks. I think the best I can do in my situation is
m[2:1]=m[1]*1:0
It's for the new chess problem. I'll post a link in a few minutes.

4:52 PM
@RobinRyder ah, I see. Yeah you could do `p[m[2:1]]=p[m]*1:0` instead since it'll just discard the remainder of `p[m]`, with a warning. 3 whole bytes!