Skip to content

Commit

Permalink
Add missing reverse-list-accumulator for SRFI 158 (#48)
Browse files Browse the repository at this point in the history
Also fixes the description of list-accumulator, which was using the
wording for reverse-list-accumulator.

Co-authored-by: Andrew Whatson <whatson@tailcall.au>
  • Loading branch information
flatwhatson and Andrew Whatson authored Oct 15, 2024
1 parent c8f7d9b commit 34357b9
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions types/srfi.158.scm
Original file line number Diff line number Diff line change
Expand Up @@ -324,6 +324,11 @@ The signature of the unfold procedure is (unfold stop? mapper successor seed arg
(return (lambda (el) (or undefined integer?))))
(desc . "Returns an accumulator that, when invoked on an object, adds 1 to a count inside the accumulator and returns an unspecified value. However, if an end-of-file object is passed, the accumulator returns the count. "))
((name . "list-accumulator")
(signature lambda () procedure?)
(subsigs
(return (lambda (el) (or undefined list?))))
(desc . "Returns an accumulator that, when invoked on an object, adds that object to a list inside the accumulator in order of accumulation and returns an unspecified value. However, if an end-of-file object is passed, the accumulator returns the list."))
((name . "reverse-list-accumulator")
(signature lambda () procedure?)
(subsigs
(return (lambda (el) (or undefined list?))))
Expand Down

0 comments on commit 34357b9

Please sign in to comment.