mutableWalls = {
var c = DOM.context2d(w, h);
var ball = {x: w / 2, y: h / 2, r: 8, dx: -2, dy: -2};
while (true) {
ball.x += ball.dx, ball.y += ball.dy;
c.fillStyle = "black";
c.fillRect(0, 0, w, h);
c.beginPath();
c.fillStyle = "blue";
c.arc(ball.x, ball.y, ball.r, 0, 2 * Math.PI);
c.fill();
if (ball.x - ball.r < 0) mutable wall = "left", ball.dx = 2;
if (ball.x + ball.r > w) mutable wall = "right", ball.dx = -2;
if (ball.y - ball.r < 0) mutable wall = "top", ball.dy = 2;
if (ball.y + ball.r > h) mutable wall = "bottom", ball.dy = -2;
yield c.canvas;
}
}