I ran the following code in the IntelliJ REPL and ...
# getting-started
e
I ran the following code in the IntelliJ REPL and was surprised that the output was a single line, not three.
Copy code
for (num in listOf(1, 2, 3)) println(num)
123
Why isn't each element on its own line?
n
huh. must be a REPL thing
✔️ 1
v
Woah, that's unexpected. Maybe a bug even
It's not a REPL think, it's a REPL in IntelliJ thing. The commandline REPL does not behave like that according to OP.
n
that last example is what really baffles me
v
Why?
n
that's really just emitting two "\n" chars, isn't it?
v
yes