How to handle Option in the case of multiple return values? #23956
-
In the case of immutability, I have to name two new variables(a1,b1). Is there a better way to handle this? |
Beta Was this translation helpful? Give feedback.
Answered by
JalonSolov
Mar 16, 2025
Replies: 1 comment 4 replies
-
No. V doesn't do tuples, it does multi-returns, and each return value must be handled separately. |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If the names
a1
andb1
offend you, assign the returns fromfoo()
to dummy vars, then usea
andb
instead ofa1
andb1
...