Ran
|
Jobs
1
|
Files
42
|
Run time
2s
|
Badge
Embed ▾
README BADGES
|
push
github
`case` should only evaluate the matching clause expr (#700) Hi, can you please consider a patch to evaluate only the expression that matches the clause. It fixes #699 . The issue was that `~(apply hash-map pairs)` evaluated all the clauses expressions. With this update, the clauses are turned into `cond` clauses, taking extra case to quote any symbol bindings. I tried to keep as match of the old code as possible, I could not think of any other way of doing so. It seems as if this requires a special form to as not to evaluate the clauses (e.g. `cond`). The drawback with this approach is that we went from O(1) to find the right expr to return it's value, to O(n). Feel free to update or discard in case there is an obvious better solution. I've included a test to confirm the same. Thanks, (the corresponding def in clojure-1.11 is [quite involved](https://github.com/clojure/clojure/blob/ce55092f2/src/clj/clojure/core.clj#L6748)) --------- Co-authored-by: ikappaki <ikappaki@users.noreply.github.com>
1634 of 1636 branches covered (99.88%)
Branch coverage included in aggregate %.
7686 of 7763 relevant lines covered (99.01%)
0.99 hits per line
ID | Job ID | Ran | Files | Coverage | |
---|---|---|---|---|---|
1 | 5871092861.1 | 42 |
99.16 |
GitHub Action Run |
Coverage | ∆ | File | Lines | Relevant | Covered | Missed | Hits/Line | Branch Hits | Branch Misses |
---|