Repeat a string: Difference between revisions

no edit summary
(Adding Monte)
No edit summary
Line 524:
return ns
end</lang>
 
=={{header|Idris}}==
<lang Idris>strRepeat : Nat -> String -> String
strRepeat Z s = ""
strRepeat (S n) s = s ++ strRepeat n s
 
chrRepeat : Nat -> Char -> String
chrRepeat Z c = ""
chrRepeat (S n) c = strCons c $ chrRepeat n c</lang>
 
=={{header|Inform 7}}==