[Question]
  [
​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.
  
[Answer]
# Javascript - 26 bytes
Defines `f()` that returns the source code character by character.
```
n=0;f=x=>("n=0;f="+f)[n++]
```
Returns undefined after it runs out of characters.
```
n=0;f=x=>("n=0;f="+f)[n++]
for(i=0;i<30;i++){console.log(f())} //test harness
```
[Answer]
# [Jelly](https://github.com/DennisMitchell/jelly), 12 bytes
```
“;⁾vṾ®ȯ©Ḣ”vṾ
```
This is a niladic link. [Try it online!](https://tio.run/nexus/jelly#@/@oYY71o8Z9ZQ937ju07sT6Qysf7lj0qGEuiP//0CJrQug/AA "Jelly – TIO Nexus") (Includes code to call the link twelve times.)
### How it works
```
“;⁾vṾ®ȯ©Ḣ”vṾ  Niladic link.
“;⁾vṾ®ȯ©Ḣ”    Set the left argument and the return value to s =: ';⁾vṾ®ȯ©Ḣ'.
           Ṿ  Uneval; yield r =: '“;⁾vṾ®ȯ©Ḣ”', a string representation of s.
          v   Eval; execute s as a Jelly program with argument r.
 ⁾vV          Yield 'vṾ'.
;             Concatenate r and 'vṾ', yielding q =: '“;⁾vṾ®ȯ©Ḣ”vṾ'.
    ®ȯ        Take the flat logical OR of the register (initially 0) and q.
              This replaces 0 with q in the first run, but it will yield the
              content of the register in subsequent runs.
      ©       Copy the result to the register.
       Ḣ      Head; pop and yield the first character of the register.
              This modifies the string in the register, so it holds one fewer
              character after each call.
```
As an added bonus, since the register will hold an empty string after the twelveth call, it is once again falsy and the link is ready to start over. Calling the link 24 times will output the source code twice, calling it 36 times thrice, etc.
[Answer]
# [stacked](https://github.com/ConorOBrien-Foxx/stacked/), noncompeting, 34 bytes
```
[tostr ':!' + execCounter # out]:!
```
A variation on the standard quine. This is a full program. This uses `execCounter` to get how many times this program specifically was run. Errors after outputting everything.
[Try it here!](https://conorobrien-foxx.github.io/stacked/stacked.html)
[Answer]
# [Pip](https://github.com/dloscutoff/pip), 31 bytes
```
{Y"{Y (yRsRPy++v)}"(yRsRPy++v)}
```
An anonymous function. [Test it on TIO!](https://tio.run/nexus/pip#@59mVR2pVB2poFEZVBwUUKmtXaZZq4TM4fJRMDbkUvBX0EhTMND8/x8A "Pip – TIO Nexus")
### Explanation
Start with this standard Pip quine:
```
Y"Y yRsRPy"yRsRPy
Y"Y yRsRPy"        Yank that string into y
           yRsRPy  In y, replace the space with repr(y)
```
Wrap this in curly braces to make it a function. Now, instead of returning the whole source, we need to index into it. Using a global variable for the index and incrementing it each time will fulfill the "next character each time it's called" requirement. `v` is the best candidate because it is preinitialized to `-1`. Incrementing it the first time gives an index of `0`, next time `1`, etc.
Pip has cyclical indexing, so once the function prints its last character, it will start over at the beginning.
[Answer]
# Python, 90 bytes
An extension on the standard Python quine (golfing tips welcome):
```
def f(n=0,s='def f(n=0,s=%r):\n while 1:yield(s%%s)[n];n+=1'):
 while 1:yield(s%s)[n];n+=1
```
This is a python [generator function](https://wiki.python.org/moin/Generators), meaning that you iterate over it, and each iteration provides the next character in the source code. When all the characters have been returned, this crashes with `IndexError`.
For testing, simply append this script to the end of the program:
```
source = ''
try:
    # Call generator, add characters to the string
    for char in f():
        source += char
except IndexError:
    # Generator has reached end of source code
    pass
print(source)
```
## Or [**try it online!**](https://tio.run/nexus/python3#ZY7LisMwDEX3/ooLJSShXbTbFK/KMPQbZrowtlIHghwkl2m/PuO@aKHaiXN1j@ZAPfqG7Xqltn5fKmm7X8ZfHEbCprsMNIZGq0rbHz5seWk3dduZD/7Cs6aTeIJFXZsslxLGAjs3jjgSk7icZAUXAnx04nwmUeSEHAmaZeBjOeiT3DAGLp9dhWUexUt7Q4bOnqaMPQc6f4kkuZu@nxJEpxByPlIAcUDqnxU@BSrhyakaMxVnbkrA3mk7/wM)
[Answer]
## [\*><>](https://esolangs.org/wiki/Starfish), ~~13~~ 21 bytes
```
" r:2+a1Fi1+:1F1+[ro;
```
Creates a file named `\n` to keep track of the index.
This may be able to be golfed more, but nothing immediately jumps out at me ...
### Output
```
$ starfish incrementalquine.sf 
"$ starfish incrementalquine.sf 
 $ starfish incrementalquine.sf 
r$ starfish incrementalquine.sf 
:$ starfish incrementalquine.sf 
2$ starfish incrementalquine.sf 
+$ starfish incrementalquine.sf 
a$ starfish incrementalquine.sf 
1$ starfish incrementalquine.sf 
F$ starfish incrementalquine.sf 
i$ starfish incrementalquine.sf 
1$ starfish incrementalquine.sf 
+$ starfish incrementalquine.sf 
:$ starfish incrementalquine.sf 
1$ starfish incrementalquine.sf 
F$ starfish incrementalquine.sf 
1$ starfish incrementalquine.sf 
+$ starfish incrementalquine.sf 
[$ starfish incrementalquine.sf 
r$ starfish incrementalquine.sf 
o$ starfish incrementalquine.sf 
;$ starfish incrementalquine.sf
```
### Explanation
```
" r:2+                 build the quine
      a1F              open file named "\n"
         i1+:          read input, increment by 1, duplicate
             1F        save incremented input to file
               1+[     increment input, copy that many values to a new stack
                  ro   output the character at the beginning of the new stack
                    ;  end
```
### Cheating Incremental Quine
```
a1Fi1+:0go1F;
```
**Explanation**
```
a1F            open file named "\n"
   i1+         read input and add 1 to it
      :0g      push the value at (input,0) to the stack
         o     output the value
          1F   save the incremented input to the file
            ;  exit
```
[Answer]
# Mathematica, 91 bytes
Comments very welcome; I'm still learning the ropes about what quines are proper quines.
```
(If[!NumberQ[q], q = 0]; StringTake[ToString[#0]<>FromCharacterCode[{91, 93}], {++q}]) & []
```
Defines a function called repeatedly with no arguments. After the 91st call, it throws a big error and returns unevaluated.
There were two issues to overcome: first, I wanted to just use `StringTake[ToString[#0]<>"[]"]`, but `ToString[]` seems to erase the quotation marks; so I had to replace `"[]"` by `FromCharacterCode[{91, 93}]`. Second, Mathematica variables start out uninitialized, so I can't call `++q` before `q` is defined; this is why the initial `If[!NumberQ[q], q = 0]` is needed.
Irrelevant coda: while looking up `NumberQ`, I learned that Mathematica has a function called `TrueQ` ... which, yes, returns `True` if the argument is `True` and `False` if the argument is `False`! (The utility is that it returns `False` on all other arguments as well.)
[Answer]
# Microscript II, ~~40~~ 33 bytes
A code block literal, the language's closest equivalent to a function:
```
{ss1K+>K>s#<v{o}sl*v!(123v)lKp<o}
```
After running, it puts itself back into `x` to make it easier to invoke again.
[Answer]
# Bash (and zsh, ksh), 39-bytes
```
a=`<$0`;pwd>>0;echo ${a:`wc -l<0`-1:1}
```
It prints nothing after once the program is printed out.
Ensure `0` does not exists in the current directory and run:
```
bash iquine.bash
```
]