You are viewing a single comment's thread. Return to all comments →
f :: Int -> [Int] -> [Int] f n [] = [] f n (x:xs) = (helper (n) (x:xs)) ++ f (n) xs where helper n (x:xs) | n==0 = [] | otherwise = x:helper (n-1) (x:xs)
Haskell beginner here
Seems like cookies are disabled on this browser, please enable them to open this website
List Replication
You are viewing a single comment's thread. Return to all comments →
Haskell beginner here