Repeat a string: Difference between revisions

Content added Content deleted
(→‎{{header|Python}}: "Characters" are just strings of length one.)
Line 224: Line 224:
or using cascade:
or using cascade:
<lang logo>show cascade 5 [combine "ha ?] "|| ; hahahahaha</lang>
<lang logo>show cascade 5 [combine "ha ?] "|| ; hahahahaha</lang>
=={{header|Lua}}==
<lang lua>function repeat(s, n) return n > 0 and s .. repeat(s, n-1) or "" end</lang>


=={{header|OCaml}}==
=={{header|OCaml}}==