“Ŀo‘’FQỌµḟ;¹V
Probieren Sie es online! oder führen Sie die ersten zehn Programme aus .
Hintergrund
Jelly hat verschiedene Arten von String-Literalen. alle fangen mit a an “. Wenn das Literal mehrere enthält “, wird ein Zeichenfolgenarray zurückgegeben“ das die Zeichenfolgen voneinander trennt.
Zum Beispiel “abc“def”Ausbeuten ['abc', 'def'].
Abhängig vom letzten Zeichen des Literales (eines davon ”«»‘’, wo «es derzeit nicht implementiert ist) kann man zwischen den verschiedenen Arten von Literalen wählen. Für erhalten ‘wir die Codepunkte in Jellys Codepage anstelle der entsprechenden Unicode-Zeichen.
Zum Beispiel “abc“def‘Ausbeuten [[97, 98, 99], [100, 101, 102]].
Die Literale in den ersten drei Programmen entsprechen den folgenden Codepunktarrays.
“Ŀo‘ -> [199, 111]
““ĿĿoo‘ -> [[], [199, 199, 111, 111]]
“““ĿĿĿooo‘ -> [[], [], [199, 199, 199, 111, 111, 111]]
Wie es funktioniert ( n = 3 )
“““ĿĿĿooo‘‘‘’’’FFFQQQỌỌỌµµµḟḟḟ;;;¹¹¹VVV Main link. Implicit argument: 0
“““ĿĿĿooo‘ Yield the 2D array
[[], [], [199, 199, 199, 111, 111, 111]].
‘‘ Increment twice, yielding
[[], [], [201, 201, 201, 113, 113, 113]].
’’’ Decrement thrice, yielding
[[], [], [198, 198, 198, 110, 110, 110]].
F Flatten, yielding
[198, 198, 198, 110, 110, 110].
FF Twice more. Does nothing.
Q Unique; yield [198, 110].
QQ Twice more. Does nothing.
Ọ Unordinal; convert the Unicode code points
198 and 110 to 'Æ' and 'n'.
ỌỌ Twice more. Does nothing.
µµµ Begin three monadic chains, all with
argument s := "Æn".
ḟ Filter-false; remove the characters of s
from s, yielding "".
ḟḟ Twice more. Does nothing.
;;;¹ Concatenate with s three times, yielding
"ÆnÆnÆn".
¹¹ Identity function. Does nothing.
V Eval the resulting Jelly code, i.e.,
call the next-prime atom thrice, with
initial implicit argument 0.
VV Eval two more times. This is a no-op
on integers.