#Aceto, 25 22 bytes
Aceto, 25 22 bytes
)&
pX`=
(pl0
id@z
r}Z)
Explanation:
We read an integer and put it on two stacks.
id
r}
On one, we call range_up (Z
), on the other range_down (z
), then we set a catch mark to be able to return to this place later:
@z
Z)
We then check if the current stack is empty and exit if so:
X`=
l0
Otherwise, we print from both stacks and jump back to the catch mark:
)&
p
(p