Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

stats/smoothed-sample appears to have type errors #47

Open
borkdude opened this issue Feb 7, 2020 · 1 comment
Open

stats/smoothed-sample appears to have type errors #47

borkdude opened this issue Feb 7, 2020 · 1 comment

Comments

@borkdude
Copy link

borkdude commented Feb 7, 2020

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.

@nilern
Copy link

nilern commented Feb 13, 2022

Indeed it has type errors and is unused.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants