23
Your task is to write a program or function that outputs the first character of its source code, then the second, then the third... each time it is run.
For example, if your program was foo
in language bar
in file baz.bar
, then you should get output similar to this:
λ bar baz.bar
f
λ bar baz.bar
o
λ bar baz.bar
o
Your program can do anything once its done printing its source code in this fashion. You may modify the source code for the file, but remember that the source code to be printed is the original source code.
This is a code-golf, so the shortest program in bytes wins.
1If we can modify the source code for the file, does that mean we can read it too? – FlipTack – 2016-12-21T11:29:10.540
1@Flp.Tkc Good question. I honestly have no idea. I don't want you to construct the quine by reading the source, but I'm okay if you read the source for the modification of the file only. – Conor O'Brien – 2016-12-21T15:44:32.517