hugoduncan/criterium

stats/smoothed-sample appears to have type errors

borkdude opened this issue · 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.

Indeed it has type errors and is unused.