Fix README.md example for when() definition

The example definition of `when` in the README does not work - here is a one-line fix.