Last active
April 25, 2024 18:28
-
-
Save PEZ/03788b118a3d7923f7aae143e8ef1aee to your computer and use it in GitHub Desktop.
Drop Every Nth Item – Rich 4Clojure Problem 41 – See: https://github.com/PEZ/rich4clojure
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns rich4clojure.easy.problem-041 | |
(:require [hyperfiddle.rcf :refer [tests]])) | |
;; = Drop Every Nth Item = | |
;; By 4Clojure user: dbyrne | |
;; Difficulty: Easy | |
;; Tags: [seqs] | |
;; | |
;; Write a function which drops every Nth item from a | |
;; sequence. | |
(def __ :tests-will-fail) | |
(comment | |
) | |
(tests | |
(__ [1 2 3 4 5 6 7 8] 3) := [1 2 4 5 7 8] | |
(__ [:a :b :c :d :e :f] 2) := [:a :c :e] | |
(__ [1 2 3 4 5 6] 4) := [1 2 3 5 6]) | |
;; To participate, fork: | |
;; https://github.com/PEZ/rich4clojure | |
;; Post your solution below, please! |
natef-GuruTech
commented
Apr 25, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment