vendredi 30 mai 2014

Is there a short version for modify and reasign a variable in Scala?


Vote count:

0




I was wondering if there is a shorter version of



var longVariableName = "Value"
longVariableName = longVariableName + " extended"


Maybe something like



var longVariableName = "Value"
longVariableName = _ + " extended"


Would be so nice :) Thank you



asked 28 secs ago

Torben

280





Aucun commentaire:

Enregistrer un commentaire