Repeat a string: Difference between revisions

Content added Content deleted
Line 225: Line 225:
<lang logo>show cascade 5 [combine "ha ?] "|| ; hahahahaha</lang>
<lang logo>show cascade 5 [combine "ha ?] "|| ; hahahahaha</lang>
=={{header|Lua}}==
=={{header|Lua}}==
<lang lua>function repeat(s, n) return n > 0 and s .. repeat(s, n-1) or "" end</lang>
<lang lua>function repeats(s, n) return n > 0 and s .. repeat(s, n-1) or "" end</lang>


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