Fork me on GitHub
#cljs-dev
<
2019-07-14
>
borkdude20:07:10

I noticed that the replicate function is deprecated, but has no metadata for it:

(defn replicate
  "DEPRECATED: Use 'repeat' instead.
  Returns a lazy seq of n xs."
  [n x] (take n (repeat x)))
vs in Clojure:
(defn replicate
  "DEPRECATED: Use 'repeat' instead.
   Returns a lazy seq of n xs."
  {:added "1.0"
   :deprecated "1.3"}
  [n x] (take n (repeat x)))
I'm currently building a linter which leverages this metadata. Tooling like that could be a reason to add metadata in CLJS as well.

borkdude20:07:29

I would be happy to submit a patch.

👍 4