// static int x; to square(int x) into int y { int i1, i2; static int prev = 0, prevResult = 0; if (x != prev) { print("Recalculating square, old " + prev + " new " + x); prev = x; prevResult = x*x; } y = prevResult; } to nextId() into int id { static int lId = square(2); lId += 1; id = lId; } class simpleClass { int id; to countCalls() into int count { static int c = 0; c += 1; count = c; } } print(nextId()); print(nextId()); print(square(2)); print(square(3)); simpleClass sim = (); print(sim.countCalls()); print(sim.countCalls()); print(sim.countCalls());