Return multiple values
func foo(a,b) {
return (a+b, a*b)
}
Catching the returned arguments:
var (x, y) = foo(4, 5)
say x #=> 9
say y #=> 20
func foo(a,b) {
return (a+b, a*b)
}
Catching the returned arguments:
var (x, y) = foo(4, 5)
say x #=> 9
say y #=> 20