walrus operator
of python language
( := )
work:- assign
the value & also return
that value.
language like swift at value assign it return nothing.
how to implement walrus operator
kind a thing in swift language
?
I think it done by make function, pass address of variable & value.
assign value in that address & return value.
Is this work or any other way for this?
Joakim is correct.
Swift doesn't have a unary operator like C.
In C, you could do:
In Swift, there isn't a unary ++ or -- operator, so you would do:
but, really, in Swift, you'd do this instead
See Reverse Range in Swift