I like rust's solution. The presence or absence of the semicolon after the last expression indicates weather the return value is the expression's result or nil. If the semicolon is left off the value is returned, otherwise the expression result is discarded.
View all comments
Show parent comment
2
u/mitsuhiko Jul 27 '13
I like rust's solution. The presence or absence of the semicolon after the last expression indicates weather the return value is the expression's result or nil. If the semicolon is left off the value is returned, otherwise the expression result is discarded.