Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- f :: Int -> [a] -> [a]
- f nr (x:xs) = g 1 nr (x:xs)
- where
- g _ _ []=[]
- g i nr (x:xs)
- |(mod i nr==0)=g(i+1) nr xs
- |otherwise = x:g(i+1) nr xs
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement