Example script
fun makeCounter() {
var i = 0;
fun count() {
i = i + 1;
print i;
}
return count;
}
var counter = makeCounter();
counter(); // "1".
counter(); // "2".
var a = "global";
{
fun showA() {
print a;
}
showA();
var a = "block";
showA();
}
class Brot {
serveOn() {
print "zum Fruhstuck";
}
}
class Vollkorn < Brot {
serveOn() {
super.serveOn();
print "Whole wheat";
}
}
Vollkorn().serveOn();