Do not use functions in loop conditions