• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

basilisp-lang / basilisp / 5871092861
99%

Build:
DEFAULT BRANCH: main
Ran 15 Aug 2023 07:59PM UTC
Jobs 1
Files 42
Run time 2s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

15 Aug 2023 07:47PM UTC coverage: 99.159%. Remained the same
5871092861

push

github

web-flow
`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

Jobs
ID Job ID Ran Files Coverage
1 5871092861.1 15 Aug 2023 07:59PM UTC 0
99.16
GitHub Action Run
Source Files on build 5871092861
Detailed source file information is not available for this build.
  • Back to Repo
  • Github Actions Build #5871092861
  • d7329a23 on github
  • Prev Build on main (#5771465890)
  • Next Build on main (#5878099334)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc