Repeat a string: Difference between revisions

m
Unicon/Icon consistency
m (Unicon/Icon consistency)
m (Unicon/Icon consistency)
Line 216:
 
<lang haskell>replicate 5 '*'</lang>
 
=={{header|Icon}}==
The procedure <tt>repl</tt> is a supplied function in Icon and Unicon.
<lang Icon>procedure main(args)
write(repl(integer(!args) | 5))
end</lang>
If it weren't, one way to write it is:
<lang Icon>procedure repl(s, n)
every (ns := "") ||:= |s\(0 <= n)
return ns
end</lang>
 
=={{header|J}}==
Anonymous user