Multiple return values
A Helios function can return multiple values:
func swap(a: Int, b: Int) -> (Int, Int) {
(b, a)
}
You can assign to multiple return values:
(a: Int, b: Int) = swap(10, 20); ... // a==20 && b==10
Some of the multiple return values can be discarded with an underscore (_
):
(a: Int, _) = swap(10, 20); ...