Programming-Idioms

History of Idiom 3 > diff from v19 to v20

Edit summary for version 20 :
New Scala implementation by user [meshelton]

Version 19

Version 20

Idiom #3 Create a procedure

Like a function which doesn't return any value, thus has only side effects (e.g. Print to standard output)

Idiom #3 Create a procedure

Like a function which doesn't return any value, thus has only side effects (e.g. Print to standard output)

Code
def doSomething(input: String): Unit = {
  println("Did something")
}