val v = 3 // Traditional immutable variables var v = 3 // Mutable variables in Scala printf("Hello, World!"); A functional programmer's question: What was this code ___intended to compute___? int x = 5; int y = 0; while (x < 10) { print("Incrementing x"); x = x + 1; y = y + 1; } // Hope: y holds the value 10 - x, for the original value of x. int y = 10 - x; def subtract(c, x): if (c == x) then 0 else 1 + subtract(c, x + 1) subtract(c, x) = if (c == x) then 0 else 1 + (if (c == x + 1) then 0 else 1 + (if (c == x + 2) )) "As fast as Cee"