summaryrefslogtreecommitdiff
path: root/11-20/15.hs
blob: f11d61c4a5d916e2c940971d1ec49ae5082602d7 (plain) (blame)
1
2
3
4
5
6
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