mirror of
https://github.com/adambard/learnxinyminutes-docs.git
synced 2024-12-23 17:41:41 +00:00
Update more function mentions in comments
This commit is contained in:
parent
bcb1b623b1
commit
23cee36b4c
@ -258,9 +258,9 @@ def addTenButMaybeTwelve(x: Int): Int = {
|
||||
if (z > 5)
|
||||
return z // This line makes z the return value of addTenButMaybeTwelve!
|
||||
else
|
||||
z + 2 // This line is the return value of anonFunc
|
||||
z + 2 // This line is the return value of anonMaybeAddTwo
|
||||
}
|
||||
anonMaybeAddTwo(x) + 10 // This line is the return value of foo
|
||||
anonMaybeAddTwo(x) + 10 // This line is the return value of addTenButMaybeTwelve
|
||||
}
|
||||
|
||||
addTenButMaybeTwelve(2) // Returns 14 as expected: 2 <= 5, adds 12
|
||||
|
Loading…
Reference in New Issue
Block a user