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

mattwparas / steel / 19119022658
45%

Build:
DEFAULT BRANCH: master
Ran 05 Nov 2025 11:24PM UTC
Jobs 1
Files 119
Run time 1min
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

05 Nov 2025 11:02PM UTC coverage: 49.086%. Remained the same
19119022658

push

github

web-flow
misc cleanup and docs in stdlib.scm (#558)

* raise an error in (drop) when called with negative n

this matches the behaviour of `(take)`

before:

```
λ > (take '(1 2 3 4) -1)
error[E11]: Generic
  ┌─ :1:2
  │
1 │ (take '(1 2 3 4) -1)
  │  ^^^^ take expects a positive integer

λ > (drop '(1 2 3 4) -1)
error[E11]: Generic
    ┌─ :652:37
    │
652 │     (if (zero? x) l (loop (sub1 x) (cdr l))))
    │                                     ^^^ cdr expects a non empty list
```

after:

```
λ > (drop '(1 2 3 4) -1)
error[E11]: Generic
    ┌─ :671:8
    │
671 │       (error 'drop "expects a positive number")
    │        ^^^^^  drop expects a positive number
```

also add some documentation.

* cleanup and sort foldl foldr unfold etc

- use shorthand procedure definition more consistently
- put foldl directly next to foldr
- just define reduce and fold as an alias instead
- rename the pred in unfold to stop?

* use cond in assoc procedures, actually use eqv? in assv

i know that the `eqv?` and `eq?` procedures actually do exactly the same
in steel, but it is still a little strange, when `assv` does not use the
`eqv?` procedure.

this also, as usual, adds some docs.

* vastly simplify for-each

if the list is null? is already checked at the start.

and also add docs.

* remove all the duplicate for-each definitions

for-each is in the stdlib, so everything should be able to just call
that function instead of defining one for themselves.

* make (flatten) work with pairs as well

before:

```
λ > (flatten '(a (b . c)))
=> '(a (b . c))
```

after:

```
λ > (flatten '(a (b . c)))
=> '(a b c)
```

also add docs

* cleanup and document the member procedures

- remove the commented out member and memq procedures in stdlib.scm

not a lot of use keeping them around, as creating them again is only a
matter of copying the memv procedure and changing eqv? to equal? / eq?.

- use shorthand procedure define for memv
- explicitly (provide memv)
- add docs to member, memv and memq

15518 of 31614 relevant lines covered (49.09%)

3131923.97 hits per line

Jobs
ID Job ID Ran Files Coverage
1 19119022658.1 05 Nov 2025 11:24PM UTC 119
49.09
GitHub Action Run
Source Files on build 19119022658
  • Tree
  • List 119
  • Changed 1
  • Source Changed 0
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • abadd96f on github
  • Prev Build on master (#19076559800)
  • Next Build on master (#19156598030)
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