You are viewing a single comment's thread. Return to all comments →
f :: Int -> [Int] -> [Int] f n arr = helper n arr [] where helper n [] result = result helper 0 (x:arr) result = helper n arr result helper n (x:arr) result = helper (n-1) (x:arr) (result ++ [x])
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 | Easy to understand | Recursion