Jump to content

Repeat a string: Difference between revisions

m
Line 820:
-- BY RHIND PAPYRUS 'EGYPTIAN' OR 'ETHIOPIAN' MULTIPLICATION ------------------
repString :: Int -> String -> String
repString n ms =
foldr
(\(d, x) a ->
Line 834:
else Nothing)
n)
(iterate (join mappend) ms) -- Iterative duplication ( mappend to self )
 
-- TEST -----------------------------------------------------------------------
9,659

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.