From 9c608c32a9387a1dd1cb045e5822733ad181ccf8 Mon Sep 17 00:00:00 2001 From: Determinant Date: Sun, 28 May 2017 20:29:11 -0400 Subject: finish vol 2 --- 11-20/15.hs | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 11-20/15.hs (limited to '11-20/15.hs') diff --git a/11-20/15.hs b/11-20/15.hs new file mode 100644 index 0000000..f11d61c --- /dev/null +++ b/11-20/15.hs @@ -0,0 +1,7 @@ +repli :: [a] -> Int -> [a] + +repli l n = rep l n + where rep [] i = [] + rep (x:xs) i + | i > 0 = x:(rep (x:xs) (i - 1)) + | otherwise = rep xs n -- cgit v1.2.3