diff options
-rw-r--r-- | forth.html.markdown | 2 | ||||
-rw-r--r-- | scala.html.markdown | 6 |
2 files changed, 5 insertions, 3 deletions
diff --git a/forth.html.markdown b/forth.html.markdown index 570e12ed..f7c0bf34 100644 --- a/forth.html.markdown +++ b/forth.html.markdown @@ -12,7 +12,7 @@ such as Open Firmware. It's also used by NASA. Note: This article focuses predominantly on the Gforth implementation of Forth, but most of what is written here should work elsewhere. -```forth +``` \ This is a comment ( This is also a comment but it's only used when defining words ) diff --git a/scala.html.markdown b/scala.html.markdown index 544abd5b..336251ba 100644 --- a/scala.html.markdown +++ b/scala.html.markdown @@ -198,8 +198,10 @@ weirdSum(2, 4) // => 16 // The return keyword exists in Scala, but it only returns from the inner-most -// def that surrounds it. It has no effect on anonymous functions. For example: -def foo(x: Int) = { +// def that surrounds it. +// WARNING: Using return in Scala is error-prone and should be avoided. +// It has no effect on anonymous functions. For example: +def foo(x: Int): Int = { val anonFunc: Int => Int = { z => if (z > 5) return z // This line makes z the return value of foo! |