J-42个字符
我可以简短地说一下,但是为什么呢?这不是我的最爱。
(#~1=6|#\)&.;: :,'You multiplied 6 by 9. '
之所以如此是因为J的monad / dyad对偶性:每个动词都可以作为monad调用(在其右侧带有一个自变量),也可以作为dyad调用,在左侧带有一个自变量,右侧带有另一个自变量。
考虑与J REPL进行以下会话:
'You multiplied 6 by 9. '
You multiplied 6 by 9.
'You multiplied 6 by 9. ' , 'You multiplied 6 by 9. '
You multiplied 6 by 9. You multiplied 6 by 9.
;: 'You multiplied 6 by 9. ' , 'You multiplied 6 by 9. ' NB. break into words
+---+----------+-+--+--+---+----------+-+--+--+
|You|multiplied|6|by|9.|You|multiplied|6|by|9.|
+---+----------+-+--+--+---+----------+-+--+--+
(#\) ;: 'You multiplied 6 by 9. ' , 'You multiplied 6 by 9. ' NB. count off
1 2 3 4 5 6 7 8 9 10
(6 | #\) ;: 'You multiplied 6 by 9. ' , 'You multiplied 6 by 9. ' NB. mod 6
1 2 3 4 5 0 1 2 3 4
(1 = 6 | #\) ;: 'You multiplied 6 by 9. ' , 'You multiplied 6 by 9. '
1 0 0 0 0 0 1 0 0 0
(#~ 1 = 6 | #\) ;: 'You multiplied 6 by 9. ' , 'You multiplied 6 by 9. ' NB. select
+---+----------+
|You|multiplied|
+---+----------+
(#~ 1 = 6 | #\)&.;: 'You multiplied 6 by 9. ' , 'You multiplied 6 by 9. ' NB. undo ;:
You multiplied
在那里,,
被视为二元组,因为它在两个自变量之间,而(#~1=6|#\)&.;:
由于它没有左自变量,所以被视为单子。因此,如果我们有一个动词可以像,
二进和(#~1=6|#\)&.;:
单动时一样,我们就会被设定。
您可能已经猜到了,这样的连接存在并且看起来像:
。Monadic f :g
等效于f
,并且等效于g
dyadic。这样就解决了问题。
示例,您可以在tryj.tk上尝试:
(#~1=6|#\)&.;: :,'You multiplied 6 by 9. '
You
(#~1=6|#\)&.;: :,'You multiplied 6 by 9. '(#~1=6|#\)&.;: :,'You multiplied 6 by 9. '
You multiplied
(#~1=6|#\)&.;: :,'You multiplied 6 by 9. '(#~1=6|#\)&.;: :,'You multiplied 6 by 9. '(#~1=6|#\)&.;: :,'You multiplied 6 by 9. '
You multiplied 6
(#~1=6|#\)&.;: :,'You multiplied 6 by 9. '(#~1=6|#\)&.;: :,'You multiplied 6 by 9. '(#~1=6|#\)&.;: :,'You multiplied 6 by 9. '(#~1=6|#\)&.;: :,'You multiplied 6 by 9. '
You multiplied 6 by
(#~1=6|#\)&.;: :,'You multiplied 6 by 9. '(#~1=6|#\)&.;: :,'You multiplied 6 by 9. '(#~1=6|#\)&.;: :,'You multiplied 6 by 9. '(#~1=6|#\)&.;: :,'You multiplied 6 by 9. '(#~1=6|#\)&.;: :,'You multiplied 6 by 9. '
You multiplied 6 by 9.
是的,逆的性质;:
使得它没有尾随空格。
将其It is by a rope.
用作短语可获得35个字符:(#~1=6|#\)&.;: :,'It is by a rope.'
。出于神秘;:
的原因,我们不需要像我的句子那样使用尾随空格。