@dseguy Turning the function into a generator with a ' yield 1; ' or similar should do the trick.
Can't think of any other way to prevent the echo. Of course printing backspaces would work not "display anything" but that feels like cheating with semantics.
@dseguy I don’t understand what you mean: I’ve just put your code in 3v4l and it works as expected: the function displays “foo” and then we display “the end” 🤔
Add comment