“Ŀo‘’FQỌµḟ;¹V
在线尝试!或者运行前十个程序。
背景
Jelly有几种不同类型的字符串文字。所有这些都以“
。开头。如果文字包含多个“
,则返回一个字符串数组,并将“
字符串彼此分开。
例如,“abc“def”
yields ['abc', 'def']
。
根据文字的最后一个字符(当前未实现的任何”«»‘’
,«
),可以在不同类型的文字之间进行选择。对于‘
,我们在Jelly的代码页中获得代码点,而不是相应的Unicode字符。
例如,“abc“def‘
yields [[97, 98, 99], [100, 101, 102]]
。
前三个程序中的文字对应于以下代码点数组。
“Ŀo‘ -> [199, 111]
““ĿĿoo‘ -> [[], [199, 199, 111, 111]]
“““ĿĿĿooo‘ -> [[], [], [199, 199, 199, 111, 111, 111]]
工作原理(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.