When.java - ported sequence() functionality.