• + 0 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