criterium icon indicating copy to clipboard operation
criterium copied to clipboard

stats/smoothed-sample appears to have type errors

Open borkdude opened this issue 5 years ago • 1 comments

When linting this function with clj-kondo:

(defn smoothed-sample
  "Smoothed estimation function."
  [c-k h-k data deviates]
  (lazy-seq
    (cons
     (* c-k (+ (take 1 data) (* h-k (take 1 deviates))))
     (if-let [n (next data)]
       (smoothed-sample c-k h-k n (next deviates))))))

I found the following type warnings:

src/criterium/stats.clj:335:16: error: Expected: number, received: seq.
src/criterium/stats.clj:335:37: error: Expected: number, received: seq.

Maybe this function is just never used anywhere, but I thought I'd drop you a message about it.

borkdude avatar Feb 07 '20 21:02 borkdude

Indeed it has type errors and is unused.

nilern avatar Feb 13 '22 19:02 nilern