Implements LOOP for unary words.