Skip to content

Instantly share code, notes, and snippets.

View toff63's full-sized avatar

Christophe Marchal toff63

View GitHub Profile
;; toff63's solution to Palindrome Detector
;; https://4clojure.com/problem/27
(fn [c] (= (seq c) (reverse c)))
;; toff63's solution to Implement range
;; https://4clojure.com/problem/34
(fn [from to] (take (- to from) (iterate inc from)))
;; toff63's solution to Get the Caps
;; https://4clojure.com/problem/29
(fn [s] (reduce str (re-seq #"[A-Z]" s)))
;; toff63's solution to Duplicate a Sequence
;; https://4clojure.com/problem/32
(fn [c] (mapcat #(vector % %) c))