swim: Simplify a code snippet.