The Python programming language
cwr_next(): move invariants out of loops. This simplifies and clarifies the code, and gives a small speedup.