Source Code

~cpp
module RepeatStr
	where

message target msg 0 = target
message target msg n = message (target++msg++"\n") (msg) (n-1)

repeatMessage msg n = putStr (message "" msg n)

Usage

~cpp
RepeatStr> repeatMessage "CAUCSE LOVE." 5

Result

~cpp
CAUCSE LOVE.
CAUCSE LOVE.
CAUCSE LOVE.
CAUCSE LOVE.
CAUCSE LOVE.
Retrieved from http://wiki.zeropage.org/wiki.php/반복문자열/임인택
last modified 2021-02-07 05:29:34