RosettaCodeData/Task/Repeat-a-string/Retro/repeat-a-string.retro

6 lines
105 B
Text
Raw Permalink Normal View History

2013-04-10 23:57:08 -07:00
with strings'
: repeatString ( $n-$ )
1- [ dup ] dip [ over prepend ] times nip ;
"ha" 5 repeatString