summaryrefslogtreecommitdiffhomepage
path: root/scala.html.markdown
diff options
context:
space:
mode:
authorHa-Duong, NGUYEN <cmpitg@gmail.com>2015-08-03 15:58:36 +0700
committerHa-Duong, NGUYEN <cmpitg@gmail.com>2015-08-03 15:58:36 +0700
commitd61ad107759c99de3dd32dc848086c16dbb14f15 (patch)
tree1b5dcf54865c47ed0432d07b012a4abeb8254909 /scala.html.markdown
parent513235c4754f87e64e5d564bb53ec643ce9333df (diff)
scala: consistent code format
Diffstat (limited to 'scala.html.markdown')
-rw-r--r--scala.html.markdown4
1 files changed, 2 insertions, 2 deletions
diff --git a/scala.html.markdown b/scala.html.markdown
index 10db5f78..c482752d 100644
--- a/scala.html.markdown
+++ b/scala.html.markdown
@@ -178,7 +178,7 @@ addWithDefault(1) // => 6
// Anonymous functions look like this:
-(x:Int) => x * x
+(x: Int) => x * x
// Unlike defs, even the input type of anonymous functions can be omitted if the
// context makes it clear. Notice the type "Int => Int" which means a function
@@ -248,7 +248,7 @@ do {
// Tail recursion is an idiomatic way of doing recurring things in Scala.
// Recursive functions need an explicit return type, the compiler can't infer it.
// Here it's Unit.
-def showNumbersInRange(a:Int, b:Int): Unit = {
+def showNumbersInRange(a: Int, b: Int): Unit = {
print(a)
if (a < b)
showNumbersInRange(a + 1, b)