Challenge
In this challenge, you will be writing the first program, p1, of an infinite sequence of programs, in which running pn outputs/generates program pn+1. When concatenating the first n >= 2 programs, the sequence should output n
.
Example
Let's say the first 4 programs are:
p1 p2 p3 p4
If I were to run p1
, it should output:
p2
If I were to run p1p2
, it should output:
2
If I were to run p1p2p3p4
it should output:
4
If I were to run p4
, it should generate the next program in the sequence:
p5
Scoring
Your score is the byte count of the first 10
programs.
p1p2p3...
always be from from p1 to pn? \$\endgroup\$