8Ḷµḟ3,4pµSḂ$Ðḟj€”,ż⁾rbx12¤Y
필요한 출력을 인쇄하는 전체 프로그램.
온라인으로 사용해보십시오!
방법
8Ḷµḟ3,4p⁸SḂ$Ðḟj€”,ż⁾rbx12¤Y - Link: no arguments
8 - literal eight
Ḷ - lowered range = [0,1,2,3,4,5,6,7]
µ - new monadic chain
3,4 - literal list = [3,4]
ḟ - filter discard = [0,1,2,5,6,7]
⁸ - chain's left argument = [0,1,2,3,4,5,6,7]
p - Cartesian product = [[0,0],[0,1],...,[2,7],[5,0],...,[7,6],[7,7]]
Ðḟ - filter discard if:
$ - last two links as a monad:
S - sum
Ḃ - modulo by 2
”, - literal comma character
j€ - join €ach pair with a comma = [0,',',0],[0,',',2],...,[2,',',6],[5,',',1],...,[7,',',5],[7,',',7]]
¤ - nilad followed by links as a nilad:
⁾rb - literal list = ['r','b']
12 - literal twelve
x - repeat = ['r','r','r','r','r','r','r','r','r','r','r','r','b','b','b','b','b','b','b','b','b','b','b','b']
ż - zip together = [[[0,',',0],'r'],[[0,',',2],'r'],...,[[2,',',6],'r'],[[5,',',1],'b'],...,[[7,',',5],'b'],[[7,',',7],'b']]
Y - join with newlines = [[0,',',0],'r','\n',[0,',',2],'r','\n',...,'\n',[2,',',6],'r','\n',[5,',',1],'b','\n',...,'\n',[7,',',5],'b','\n',[7,',',7],'b']
- implicit print (smashes the list of lists and characters
- together and prints the digits)
x=3
와x=4
?