Quoi qu'il en soit
Tuesday, 19 February 2008
Not using = equals in a Scala method definition
If the return type of a method is Unit,
def add(b: Byte): Unit = sum += b
then it can be written like this instead:
def add(b: Byte) { sum += b }
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
Blog Archive
►
2017
(1)
►
March
(1)
►
2016
(1)
►
August
(1)
►
2014
(3)
►
March
(3)
►
2012
(4)
►
September
(1)
►
May
(3)
►
2011
(1)
►
March
(1)
►
2010
(5)
►
June
(1)
►
April
(2)
►
March
(1)
►
February
(1)
►
2009
(14)
►
November
(3)
►
October
(7)
►
September
(4)
▼
2008
(4)
▼
February
(4)
Not using = equals in a Scala method definition
Scala nuggets not in in the draft "Programming in...
Translating Java to Scala
Generic compute server in Scala using remote actors
No comments:
Post a Comment