Join Slack
Powered by
sometimes you could want to assign the same value ...
# announcements
r
rolgalan
12/24/2015, 1:14 PM
sometimes you could want to assign the same value to different variables, or using a method such
(if (cond) a else b).foo()
. Of course you can and the
.foo()
in each branch and will work, but then you will be duplicating code. I’ve seen this language behaviour previously, and I think it’s pretty cool
4
Views
Open in Slack
Previous
Next