Repeat a string: Difference between revisions
Content added Content deleted
(Don't invalidate the bulk of other entries by making additional goal discretionary.) |
(→{{header|J}}: extend for additional task) |
||
Line 120: | Line 120: | ||
=={{header|J}}== |
=={{header|J}}== |
||
<lang j> 5 |
<lang j> 5 # '*' NB. repeat each item 5 times |
||
***** |
|||
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> |
hahahahaha</lang> |
||