Pointers and references
A simple example of passing a variable-reference to a function:
func assign2ref(ref, value) {
*ref = value
}
var x = 10
assign2ref(\x, 20)
say x # x is now 20
A simple example of passing a variable-reference to a function:
func assign2ref(ref, value) {
*ref = value
}
var x = 10
assign2ref(\x, 20)
say x # x is now 20