CARVIEW |
Select Language
HTTP/2 200
date: Sat, 11 Oct 2025 04:10:58 GMT
content-type: text/html; charset=UTF-8
server: cloudflare
x-frame-options: DENY
x-content-type-options: nosniff
x-xss-protection: 1;mode=block
vary: accept-encoding
cf-cache-status: DYNAMIC
content-encoding: gzip
set-cookie: _csrf-frontend=00ed97c0161c25957f0d6cfffaa726aaf6be51ee6b9f7f5ccc8e5a953fd1ef6fa%3A2%3A%7Bi%3A0%3Bs%3A14%3A%22_csrf-frontend%22%3Bi%3A1%3Bs%3A32%3A%22q_mmeRkSLXTNkJnWrt2s6sIWv6rorjuo%22%3B%7D; HttpOnly; Path=/
cf-ray: 98cb82c1fa3e8087-BLR
;;https://www.4clojure.com/problem/41;;Write a function which drops every Nth i - Pastebin.com
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ;;https://www.4clojure.com/problem/41
- ;;Write a function which drops every Nth item from a sequence.
- ;;(= (__ [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])
- ;;(= (__ [1 2 3 4 5 6 7 8] 3) [1 2 4 5 7 8])
- (fn
- [base-seq remove-nth]
- (let [g (fn
- [base-seq remove-nth]
- (loop [x (- remove-nth 1)
- result []]
- (if (< x (count base-seq))
- (recur (+ x remove-nth) (conj result x))
- result)))
- f (fn
- [base-seq remove-nth]
- (keep-indexed
- (fn
- [index item]
- (if (contains? (set remove-nth) index)
- nil
- item))
- base-seq))]
- (f base-seq (g base-seq remove-nth))))
Advertisement
Add Comment
Please, Sign In to add comment
-
⭐✅ Exploit 2500$ in 15 Minutes⭐⭐⭐ X
JavaScript | 6 sec ago | 0.24 KB
-
Free Crypto Method (NEVER SEEN BEFORE)⭐⭐ W
JavaScript | 17 sec ago | 0.24 KB
-
⭐✅ Swapzone Glitch ✅ Working⭐⭐⭐ V
JavaScript | 28 sec ago | 0.24 KB
-
⭐✅ Exploit 2500$ in 15 Minutes⭐⭐⭐ X
JavaScript | 1 min ago | 0.24 KB
-
Free Crypto Method (NEVER SEEN BEFORE)⭐⭐ W
JavaScript | 2 min ago | 0.24 KB
-
⭐✅ Swapzone Glitch ✅ Working⭐⭐⭐ V
JavaScript | 2 min ago | 0.24 KB
-
✅ Make $2500 in 20 minutes⭐⭐⭐ 5
JavaScript | 2 min ago | 0.24 KB
-
⭐⭐Exchange Exploit⭐⭐ 3
JavaScript | 2 min ago | 0.24 KB
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand