これは非常に単純な課題です。
ジョーク言語InterpretMeは1つのコマンドで構成されています。*これにより、プログラムはInterpretMeプログラムの入力を取得して実行します。
InterpretMeプログラムは*、入力と同じ数のInterpretMeプログラムを解釈します。
あなたの目標は、InterpretMeをできるだけ少ないバイト数で解釈するプログラムを作成することです。
入力
入力は、1行のASCII文字列、本当に必要な場合はUnicode utf-8文字列、必要な場合は言語が使用する文字エンコーディングで構成されます。これらの文字列は、InterpretMeインタープリターの最初またはすべての実行の開始時に入力できます。それらがすべて最初に入力された場合、プログラムは開始時にすべてのプログラム行を出力する必要があります。
出力
この課題では、1つの入力のオプションを選択しない限り、出力はありません。それ以外の場合は、終了と非終了のみです。
テストケースは、入力と出力ではなく、入力と終了で構成されます。改行は、InterpretMeとして解釈される新しい入力を示します。
最初に1つの入力を使用する場合、これは、これらのプログラムが入力されたときに出力され、非アクティブな(何もしない)行が続くと考えられます。
1. * (executes input as an interpret me program, finishes)
2. * (^same)
3. ** (executes input as an interpret me program, then does this again after the first program is done, finishes)
4. hi (nothing, first star of previous line finishes)
5. ** (same as the other two star line)
6. hi (nothing, first star of previous line finishes)
7. hi (nothing, second star of line 5 finishes, so second star of line 3 finishes, so line 2 finishes, so line one finishes)
[termination] (not outputted)
hi (does nothing and finishes)
[termination]
*hi (executes inputted program, finishes)
*yo (executes inputted program, finishes)
hey (nothing)
[termination]
繰り返しますが、これはcode-golfなので、バイト数は少ない方が良いです