Repeat a string: Difference between revisions
→{{header|J}}: extend for additional task
(Don't invalidate the bulk of other entries by making additional goal discretionary.) |
(→{{header|J}}: extend for additional task) |
||
Line 120:
=={{header|J}}==
<lang j> 5
*****
5 # 'ha' NB. repeat each item 5 times
hhhhhaaaaa
(5 * # 'ha') $ 'ha' NB. repeat array 5 times (explicit)
hahahahaha
5 ((* #) $ ]) 'ha' NB. repeat array 5 times (tacit)
hahahahaha</lang>
|