This image is from a well-written 2009 post on SO by Laurence Gonsalves about functional reactive programming. In his example,
y are more or less equivalent to constantly calling
getY() on a
MouseEvent in Java or Scala. By that I mean that (a)
getX() is immutable, and (b) its value changes over time, as the person moves the mouse.
(Here’s a link to where I show how to use MouseEvent as a MouseMotionListener.)