Learn Clojure! (@learnclojure) profile picture

Learn Clojure and ClojureScript through small examples.

Earth
Joined March 2010
(for [[n v] (ns-publics 'clojure.core) :let [since (:added (meta v))] :when (= since "1.4")] n) ;; vars since 1.4 in core / cc @learnclojure
4
3
Learn Clojure! retweeted
Replying to @learnclojure
@learnclojure On top of it being an obtuse and inefficient way to solve the problem, it doesn't work for the common case of same guesses.
Learn Clojure! retweeted
(reduce (fn [m w] (assoc m w (+ 1 (get m w 0)))) {} ((fn [txt] (re-seq #"\w+" txt)) "a b r a c a d a b r a")) 2 days can change perspective!
Replying to @learnclojure
@cleotd (merge-with #([%1 %2] 0) {:bar "Ethel"} {:bar "Ricky"})
Replying to @learnclojure
@cleotd (merge-with (fn [x _] x) {:bar "Ethel"} {:bar "Ricky"}) slightly more idiomatic clojure ?