summaryrefslogtreecommitdiff
path: root/11-20/16.hs
diff options
context:
space:
mode:
Diffstat (limited to '11-20/16.hs')
-rw-r--r--11-20/16.hs7
1 files changed, 7 insertions, 0 deletions
diff --git a/11-20/16.hs b/11-20/16.hs
new file mode 100644
index 0000000..74cc946
--- /dev/null
+++ b/11-20/16.hs
@@ -0,0 +1,7 @@
+dropEvery :: [a] -> Int -> [a]
+
+dropEvery l n = d l 1
+ where d [] i = []
+ d (x:xs) i
+ | i == n = d xs 1
+ | otherwise = x:d xs (i + 1)