Skip to content

Commit

Permalink
remove unneeded fmap function
Browse files Browse the repository at this point in the history
  • Loading branch information
bitsai committed Aug 25, 2011
1 parent 4507f24 commit ac2e9f5
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions clojure/euler.clj
Expand Up @@ -80,16 +80,6 @@
(defn find-first [pred coll]
(first (filter pred coll)))

;; From Konrad Hinsen's c.c.generic.functor library
(defmulti fmap (fn [f coll] (type coll)))

(defmethod fmap clojure.lang.IPersistentMap [f m]
(into {} (for [[k v] m]
[k (f v)])))

(defmethod fmap :default [f coll]
(into (empty coll) (map f coll)))

;; Predicates
(defn divides? [a b]
(zero? (rem a b)))
Expand Down

0 comments on commit ac2e9f5

Please sign in to comment.