view interps/cfunge/cfunge-src/tests/iterate-iterate.b109 @ 12500:e48c08805365 draft default tip

<b_jonas> ` learn \'The password of the month is Cthulhuquagdonic Mothraquagdonic Narwhalicorn.\' # https://logs.esolangs.org/libera-esolangs/2024-04.html#lKE Infinite craft
author HackEso <hackeso@esolangs.org>
date Wed, 01 May 2024 06:39:10 +0000
parents 859f9b4339e6
children
line wrap: on
line source

32kk5 >:#._a,                          v
v"Correct output is:"a"5 5 5 5 5 5 5 5"<
>:#,_a,@

This tests k on k...
Output should be:
5 5 5 5 5 5 5 5
Correct output is:
5 5 5 5 5 5 5 5

Here is how the stack should look after the different steps, spaces for clarity:
First iteration of inner k:             555
Next itereation where inner k pops a 5: 55
Now it pushed five 5s:                  55 55555
Finally the code resumes at the 5:      55 55555 5