“Ŀo‘’FQỌµḟ;¹V
Cobalah online! atau jalankan sepuluh program pertama .
Latar Belakang
Jelly memiliki beberapa jenis string literal; semuanya dimulai dengan a “. Jika literal berisi lebih dari satu “, array string dikembalikan, dan “memisahkan string satu sama lain.
Misalnya, “abc“def”hasil ['abc', 'def'].
Bergantung pada karakter terakhir dari literal (salah satu dari ”«»‘’, di mana «saat ini tidak diterapkan), seseorang dapat memilih antara berbagai jenis literal. Karena ‘, kami mendapatkan poin kode di halaman kode Jelly alih-alih karakter Unicode yang sesuai.
Misalnya, “abc“def‘hasil [[97, 98, 99], [100, 101, 102]].
Literal dalam tiga program pertama sesuai dengan array titik kode berikut.
“Ŀo‘ -> [199, 111]
““ĿĿoo‘ -> [[], [199, 199, 111, 111]]
“““ĿĿĿooo‘ -> [[], [], [199, 199, 199, 111, 111, 111]]
Cara kerjanya ( 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.